Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent automatic screen lock in iPad

I am downloading some contents from the server and after sometimes the screen is locked down. The downloading is happening in the background. And I am showing a video after download completes. And in this case, i.e, when the screen is locked, after downloading completes all I can see is just a black screen (After unlocking). In the simulator, I could see the video playing.. but the video has already been started.

Is there any way to prevent the iPad from being Screen Lock? (Other than setting it in the settings menu)

like image 561
Nibin V Avatar asked Dec 03 '22 07:12

Nibin V


1 Answers

This may help you

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
like image 184
Ankit Srivastava Avatar answered Dec 16 '22 15:12

Ankit Srivastava