Developer/iOS

[iOS] 페이지 넘기는 효과

블로blow 2011. 6. 7. 09:43
728x90


CGContextRef
context = UIGraphicsGetCurrentContext();

[UIView beginAnimations:nil context:context];

[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[UIView setAnimationDuration:1.0];


UIView *whiteBackdrop = self.pageView;


NSArray *array = [self.pageView subviews];


// Choose up or down curl


[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:whiteBackdrop cache:YES];


for (int i=1; i<[array count]; i++)

{

    [whiteBackdrop exchangeSubviewAtIndex:[array count]-i withSubviewAtIndex:[array count]-i-1];

}

[UIView setAnimationDelegate:self];


[UIView commitAnimations];

728x90