在我的应用程序中,我希望启动画面动画我正在使用以下代码,但动画无效.
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");
}
];
Run Code Online (Sandbox Code Playgroud) 每当出现“丢弃消息”日志时,我的应用都将无响应。它不会崩溃,但也不会响应触摸。好像所有的触摸处理都在我的应用程序退回地面后停止,然后在2〜3分钟后当我的应用程序退回地面并触摸菜单时,没有响应,然后过了几分钟,它开始起作用