/*
*动画加载
*/
- (void)finishedFading{
CATransition *transition = [CATransition animation];
transition.duration = 3.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
NSString *subtypes[4] = {kCATransitionFromLeft,kCATransitionFromRight,kCATransitionFromTop,kCATransitionFromBottom};
NSString *moreTypes[] = {@"fade",@"cube",@"suckEffect",@"oglFlip",@"rippleEffect",@"pageCurl",@"pageUnCurl",@"cameraIrisHollowOpen",@"cameraIrisHollowClose"};
transition.type = moreTypes[0];
transition.subtype = subtypes[2];
[self.view.layer addAnimation:transition forKey:@"fade"];
[self.view exchangeSubviewAtIndex:1 withSubviewAtIndex:0];
[viewController removeFromParentViewController];
[self loadInitView];
}
转载于:https://my.oschina.net/simple2012/blog/102071