There is a private instance method for UIApplication:
The following code would work, (tested in an iPhone 3GS):
UIApplication *app = [UIApplication sharedApplication];
[app performSelector:@selector(suspend)];
More Related Contents:
- How measure distance between to objects using Camera in iPhone? [closed]
- How to read formatted string from a text file?
- Comparison between Corona, Phonegap, Titanium
- How to insert utf-8 mb4 character(emoji in ios5) in mysql?
- iPhone 5 CSS media query
- How do you access a website running on localhost from iPhone browser
- How to add a UIImage in MailComposer Sheet of MFMailComposeViewController
- Why am I having to manually set my view’s frame in viewDidLoad?
- Aligning text and image on UIButton with imageEdgeInsets and titleEdgeInsets
- UIImagePickerController camera preview is portrait in landscape app
- What does @synthesize window=_window do?
- UIModalTransitionStylePartialCurl doesn’t get back to previous state. (Not dismissing)
- Version of XSLT in iPhone
- Set ringtone in iPhone SDK [closed]
- How can I use NSError in my iPhone App?
- Last In-First Out Stack with GCD?
- set background image for entire iPhone / iPad app
- How to read objective-c stack traces
- How to know whether app is terminated by user or iOS (after 10min background)
- Convert decimal to fraction in Objective-C?
- Iframe Content Not Rendering Under Scroll In iOs5 iPad/iPhone
- Split NSData objects into other NSData objects of a given size
- How do I use NSConditionLock? Or NSCondition
- Strange issue after upgrading to iOS 4.1 SDK
- Replace icon pin by text label in annotation?
- Loop an UIScrollView [duplicate]
- Load image to a tableView from URL iphone sdk
- Handling Push Notifications when App is NOT running
- how to fix the issue “Command /bin/sh failed with exit code 1” in iphone
- Make Background of UIView a Gradient Without Sub Classing