objective c - How do I keep the user's iPhone's display on? -


so, looking way keep user's iphone display on clock app. found [uiapplication sharedapplication].idletimerdisabled = yes; keeps device locking of time. tried [uiapplication sharedapplication].idletimerdisabled = no; when application goes background, doesn't work. how can safely keep user's device sleeping while app running?

alter idletimerdisabled property whenever app changes active state - if you're going backgrounded, re-enable timer, , when regain control, disable timer again.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -