I’m new to iPhone SDK.
Any idea how to put the iPhone into the sleep mode from within the code (my application), as if the user has clicked the sleep/wake button?
Best regards.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your UIApplicationDelegate will have
called when the lock button is pressed but there does not seem to be a way to trigger this from code.
I’m pretty sure this will be disallowed.
You are not permitted to make changes to the state of the device (change volume etc) which would not be expected by the user.