在我的应用程序中,我想让初始屏幕成为动画我正在使用下面的代码,但动画无效。iOS初始屏幕动画
UIImageView *splashScreen = [[UIImageView alloc] initWithImage:[UIImage imageNamed: @"Default.png"]];
[self.window.rootViewController.view addSubview: splashScreen];
[self.window makeKeyAndVisible];
NSLog(@"begin splash");
[UIView animateWithDuration: 0.2
delay: 0.5
options: UIViewAnimationOptionCurveEaseOut
animations: ^{splashScreen.alpha = 0.0;
}
completion:^(BOOL finished) {
[splashScreen removeFromSuperview];
NSLog(@"end splash");
}
];
你想要一个闪屏? Y这很复杂 – chandru
您的默认屏幕非常漂亮,我想看到它比我需要更长的时间?我对此表示怀疑。准备就绪后,我宁愿开始使用该应用程序。大多数人也是如此。 – Abizern
你在哪里可以在rootViewController的viewDidLoad或其他地方使用这段代码 – channi