动画

/*
 *动画加载
 */
- (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];
}

你可能感兴趣的:(动画)