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

How can I edit my VIM config so that Vim treats ".ejs" files the same as it currently treats my html files? -

Python __call__ special method practical example -