-
Subscribe
Categories
Tutorials
- iPhone Coding – Turbo Charging Your Apps With NSOperation
- iPhone Coding Recipe – Shortening URLs
- iPhone Coding Recipe: Live Character Counter, Word filter, and 1337 Translator For A UITextField
- UITextField – A Complete API Overview
- iPhone Coding Tutorial – In Application Emailing
- iPhone Coding Tutorial – Inserting A UITextField In A UIAlertView
- iPhone Coding Tutorial – Creating an Online Leaderboard For Your Games
- Debugging Tutorial – Automating Your Tests With A UIRecorder Instrument
- Objective-C Tutorial: NSArray
- iPhone Programming Tutorial: Animating A Game Sprite
-
Archives
Category Archives: Code Snippets
Code Snippet: Prevent The iPhone From Sleeping
The code below will prevent the iPhone from dimming its screen and ultimately going to sleep. Use it wisely as you don't want your application becoming notorious for being a battery hog :)
[UIApplication sharedApplication].idleTimerDisabled = YES;
Happy iCoding!
NSTimer: The Poor Man’s Threading – Code Snapshot
Introduction
Hey guys. So usually the posts we put up here involve screencasts and presentations, but we are going to start also posting small less time consuming pieces for the site. Today I bring to you a small project involving NSTimers. [...]
Code Snippet: Prevent The iPhone From Sleeping
The code below will prevent the iPhone from dimming its screen and ultimately going to sleep. Use it wisely as you don't want your application becoming notorious for being a battery hog :)
[UIApplication sharedApplication].idleTimerDisabled = YES;
Happy iCoding!


NSTimer: The Poor Man’s Threading – Code Snapshot