IT虾米网

iOS视图翻页过渡效果

luoye 2018年06月24日 手机开发 955 0
CGContextRef context = UIGraphicsGetCurrentContext();  
[UIView beginAnimations:nil context:context]; 
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];  
[UIView setAnimationDuration:1.0]; 
// Apply the animation to the backdrop 
[UIView setAnimationTransition:  
    UIViewAnimationTransitionCurlUp 
    forView:myView cache:YES]; 
// Exchange the two foreground views  
[myView exchangeSubviewAtIndex:0 
    withSubviewAtIndex:1];  
[UIView commitAnimations];

评论关闭
IT虾米网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!