How do I take a Screen Shot of a UIView that hasn't been loaded yet?
To explain the main features of my iPhone app I want to create a modal view, which shows some screen shots of my app in the background and some explanations on top.
I create the screen shots (in the background) with
self.tabBarController.select开发者_如何学GoedIndex = selectedTab;
UIGraphicsBeginImageContext(CGSizeMake(320,480));
CGContextRef context = UIGraphicsGetCurrentContext();
[self.tabBarController.view.layer renderInContext:context];
UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
But some of the views in my tabBarController may not have been fully loaded yet.
Also the layout of almost all views looks distorted in the screen shots.Any suggestions?
Thank you!Design your app first without the screenshots first. Take real screenshots from the device and annotate them and include them in your app.
If you don't want to do that, then you are stuck.
精彩评论