AppDelegate uygulama içinde her şeyi yapmasına Dancreek cevabı Modifiye. Bunu beğendim çünkü kodun sadece uygulama başlangıcında çalışması garanti ediliyor ve görüntü denetleyicilerinden hiçbirini kirletmiyor.
Çok basit:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// set up your root view and stuff....
//.....(do whatever else you need to do)...
// show the main window, overlay with splash screen + alpha dissolve...
UIImageView *splashScreen = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Default.png"]];
[self.window addSubview:splashScreen];
[self.window makeKeyAndVisible];
[UIView animateWithDuration:0.3 animations:^{splashScreen.alpha = 0.0;}
completion:(void (^)(BOOL)) ^{
[splashScreen removeFromSuperview];
}
];
}
temiz ve basit bir çözüm gibi görünüyor! – marzapower