How to avoid the iphone go into sleep mode programmatically?

0 votes
157 views
asked Mar 12, 2015 in Objective C by kalpana (3,995 points)
HI All

   How to avoid the iphone go into sleep mode programmatically?

1 Answer

0 votes
answered Mar 12, 2015 by admin (8,115 points)

Hi Kalpana

  Try this 

       [[UIApplication sharedApplication] setIdleTimerDisabled:YES];

...