2
我嘗試使UIViewAnimationTransitionCurlUp水平工作,所以我旋轉視圖應用動畫。但沒有奏效,動畫從底部到頂部停留。任何想法?UIViewAnimationTransitionCurlUp水平工作
first = [[PDFPortraitView alloc] initWithFrame:CGRectMake(0, 0, 960, 768) andCurrentPage:currentPage];
container = [[UIView alloc] initWithFrame:CGRectMake(-96, 140, 960, 768)];
container.backgroundColor = [UIColor redColor];
container.transform = CGAffineTransformMakeRotation(M_PI * (0.5));
[self.view addSubview:container];
[container addSubview:first];
second = [[PDFPortraitView alloc] initWithFrame:CGRectMake(0, 0, 960, 768) andCurrentPage:currentPage];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.5f];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:container cache:NO];
[first removeFromSuperview];
[container addSubview:second];
[UIView commitAnimations];