Ios UIViewAnimationTransitionCurlUp水平工作
我尝试使UIViewAnimationTransitionCurlUp水平工作,以便旋转应用动画的视图。但是动画没有起作用,动画从下到上。有什么想法吗Ios UIViewAnimationTransitionCurlUp水平工作,ios,uiview,uiviewanimation,uiviewanimationtransition,Ios,Uiview,Uiviewanimation,Uiviewanimationtransition,我尝试使UIViewAnimationTransitionCurlUp水平工作,以便旋转应用动画的视图。但是动画没有起作用,动画从下到上。有什么想法吗 first = [[PDFPortraitView alloc] initWithFrame:CGRectMake(0, 0, 960, 768) andCurrentPage:currentPage]; container = [[UIView alloc] initWithFrame:CGRectMake(-96, 140, 960,
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];
尝试对视图的superview变换应用90度旋转。这将变换视图的坐标空间,因此应用于子视图的卷曲变换应在旋转坐标中卷曲 您可能必须创建多个视图以防止内容被旋转: 外部视图,旋转90度 中间视图-这是获取卷曲过渡的视图
inner view, rotated -90 degrees, and containing your actual content.
我还没试过,但那应该行得通
请注意,切换到的视图必须是中间视图/内部视图组合。尝试对视图的superview变换应用90度旋转。这将变换视图的坐标空间,因此应用于子视图的卷曲变换应在旋转坐标中卷曲 您可能必须创建多个视图以防止内容被旋转: 外部视图,旋转90度 中间视图-这是获取卷曲过渡的视图
inner view, rotated -90 degrees, and containing your actual content.
我还没试过,但那应该行得通
请注意,切换到的视图必须是中间视图/内部视图组合