Is it possible to turn a view slowly like turning a page? When i swipe from right to left, the current view will turn and the next view will be shown. And from left to right, the previous view will come slowly as we move the finger.
是否可以像翻页一样慢慢转动视图?当我从右向左滑动时,当前视图将转动,并显示下一个视图。从左到右,当我们移动手指时,前一个视图会慢慢来。
How can I do it? Any ideas??
我该怎么做?有任何想法吗??
1 个解决方案
#1
0
You should add and remove subviews from your view by detecting the touch movements, using the animation transtion styles:
您应该使用动画转换样式通过检测触摸移动来添加和删除视图中的子视图:
UIViewAnimationTransitionCurlUp //for removing views (vice-versa)
UIViewAnimationTransitionCurlDown // for adding views (vice-versa)
like:
喜欢:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:NO];
[self.view addSubview:nextView];
[UIView commitAnimations];
You should customize above according to ur needs.
你应该根据你的需要定制上面。
Hope this helps.
希望这可以帮助。
Thanks,
谢谢,
Madhup
Madhup
#1
0
You should add and remove subviews from your view by detecting the touch movements, using the animation transtion styles:
您应该使用动画转换样式通过检测触摸移动来添加和删除视图中的子视图:
UIViewAnimationTransitionCurlUp //for removing views (vice-versa)
UIViewAnimationTransitionCurlDown // for adding views (vice-versa)
like:
喜欢:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:NO];
[self.view addSubview:nextView];
[UIView commitAnimations];
You should customize above according to ur needs.
你应该根据你的需要定制上面。
Hope this helps.
希望这可以帮助。
Thanks,
谢谢,
Madhup
Madhup