我已经在另一个应用程序中实现了这段代码,效果很好。现在,相同的代码在这里不起作用(我正在导入 QuartzCore 框架)......调用了日志消息。有人可以帮我吗?提前致谢。这是我的代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[NSThread sleepForTimeInterval:1.5];
CATransition *transition = [CATransition animation];
transition.delegate = self;
transition.duration = 1.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionFade;
[[window layer] addAnimation:transition forKey:nil];
[window addSubview:[navigationController view]];
[window makeKeyAndVisible];
return YES;
}
- (void)animationDidStop:(CAAnimation *)theAnimation finished: (BOOL)flag
{
NSLog(@"Animation did stop!");
}