I have an application in which I want to lock the iPhone programmatically so that the user can't perform any action.
How can I determine the user is not working with the iPhone for some period, and after that period automatically lock the phone?
Such applications are used in all phone devices, where the user can set an auto-lock time and then the device will automatically lock if the user does not handle the device. How is it done programmatically? Please give me one example of the code so I can perform this easily.
I am new to iPhone programming, and I am struggling in my application. Help me. Thanks in advance.