In general, you cannot do anything programmatically that takes control of the device away from the user and any function that does so is automatically a non-starter and Apple blocks it. How would having apps lock the screen empower the user? If a user wants the screen locked they can already lock it themselves at any time.
– TechZenAug 04 '10 at 13:45
Not to mention the possible mischief that could result from locking and unlocking the phone without the user's knowledge.
– TechZenAug 04 '10 at 13:48
possible duplicate of [Programmatically Lock and unlock Screen of iPhone .](http://stackoverflow.com/questions/832940/programmatically-lock-and-unlock-screen-of-iphone)
– Brad LarsonAug 04 '10 at 14:14
lol. this is hilarious... "I will not answer your question here on Stackoverflow if you ask anything about Iphone or IPHONE or I-phone." Good one!
– Calvin ChengNov 06 '12 at 09:03