(Tested with iOS 7 and autoload)
I use the screenshot function of the simulator in conjunction with some compilation of conditional code. By uncommenting #define , I can quickly switch to "take snapshot" mode for the startup screen
The main trick is to hide the status bar when the view controller appears on your home screen, but with a very long animation, so you have enough time to click on the screenshot command in the simulator, which makes the screenshot right on your desktop (or take a screenshot on the device if you want to).
Using the code below, the status bar immediately disappears thanks to " UIStatusBarAnimationNone ", but the "sliding screen" is animated for a very long period (5000.0 seconds in the code below). Therefore, before the bar begins to “move” 1 point of 20 points vertically, you will receive approximately 5000/20 = 250 seconds to take a screenshot (and coffee).
- (BOOL)prefersStatusBarHidden { return YES; } - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation { #ifdef kTAKE_LAUNCHIMAGE_SCREENSHOT return UIStatusBarAnimationNone; #else return UIStatusBarAnimationSlide; #endif } - (void)removeStatusBarAnimated { #ifdef kTAKE_LAUNCHIMAGE_SCREENSHOT [UIView animateWithDuration:5000.0 animations:^{ [self setNeedsStatusBarAppearanceUpdate]; }]; #else [UIView animateWithDuration:2.0 animations:^{ [self setNeedsStatusBarAppearanceUpdate]; }]; #endif }
for more information on status bar control in iOS 7, check out my answer and code here:
fooobar.com/questions/175993 / ...
source share