Preloading view in phone app
When my app launches there's a black screen before the startup view is开发者_StackOverflow completely loaded. Is there a way I can have a progressview or something while the app is loading. Just like Mac , windows or any simple app has a preloading screen.
Instead of creating a preload view you can use Default.png image, which will be shown when the app loads.
iOS Human Interface Guidelines says,
To enhance the user’s experience at application launch, you must provide at least one launch image. A launch image looks very similar to the first screen your application displays. iOS displays this image instantly when the user starts your application and until the app is fully ready to use. As soon as your app is ready for use, your app displays its first screen, replacing the launch placeholder image.
You can add UIView in MainWindow.xib
file and see When app Loads, Hide that UIView Programmatically or You can also add animation in UIImageView inside UIView for Progress like Explained below in UIImageView...
-(void)setImageAnimation
{
NSMutableArray *arrImages = [[NSMutableArray alloc]init];
for (int i = 1; i < 5; i++) {
NSLog(@"%@",[NSString stringWithFormat:@"%d.png",i]);
[arrImages addObject:[UIImage imageNamed:[NSString stringWithFormat:@"%d.png",i]]];
}
imgViewSending.animationImages = arrImages;
imgViewSending.animationDuration = 1.0;
[imgViewSending startAnimating];
[arrImages release];
}
When app loads you can hide that view...
You can also set SplashScreen in your project..Just rename your image as Default.png
,It will automatically loads that image when app starts..
As I had done this successfully in my application..
Happy Coding...
use splash screen
http://adeem.me/blog/2009/06/22/creating-splash-screen-tutorial-for-iphone/
精彩评论