作者:朱克锋
邮箱:zhukefeng@iboxpay.com
转载请注明出处:http://blog.csdn.net/linux_zkf
- (void) curl: (id) sender
{
CGContextRef ctx = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:ctx];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:2.0];
UIView *bdrop = [self.view viewWithTag:ox1024];
if ([(UISegmentedControl *)self.navigationItem.titleView selectedSegmentIndex])
{
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:whiteBackdrop cache:YES];
}
else
{
[UIView setAnimationTransition: UIViewAnimationTransitionCurlDown forView:whiteBackdrop cache:YES];
}
NSInteger b = [[bdrop subviews] indexOfObject:[bdrop viewWithTag:ox1025]];
NSInteger m = [[bdrop subviews] indexOfObject:[bdrop viewWithTag:0x1026]];
[whiteBackdrop exchangeSubviewAtIndex:b withSubviewAtIndex:m];
[UIView setAnimationDelegate:self];
[UIView commitAnimations];
}