自定义幻灯片左视图过渡
我正在尝试在识别滑动手势时进行简单的视图转换; 我对 Objective C 和 iO 都是绝对的初学者,并且在语义上我真的很挣扎。
我正在使用这个:
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view2 cache:YES];
我有一个带有默认视图和2个其他视图(view1和view2)的视图控制器,当默认视图加载时,它们作为子视图插入到self.view(if(viewDidLoad))
我试图获得6个不同的视图视图,并能够向左和向右滑动到下一个和上一个视图。 (类似于一些图片库) 默认视图是 view1,向左滑动转到 view2。
到目前为止,我所拥有的工作正常,但我受到 4 种类型的标准过渡向上/向下卷曲和向左/向右翻转的限制。
我需要一张左/右过渡幻灯片来替换我当前的幻灯片。 如何定义新的? 我需要CG框架吗?或者我可以不使用它就走开吗?
我可以做一些像
transition ***myTransition**
{
define transition
}
[UIView setAnimationTransition: **myTransition** forView:self.view2 cache:YES];
谢谢你一样的事情吗?
I am trying to do a simple view transition when swiping gesture is recognized;
I am absolute beginner to both objective C and iOs and I am really strugelling with the semantics.
i am using this:
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view2 cache:YES];
I have a view controller with a default view and 2 other views(view1 and view2) which are inserted as subviews to self.view when the default view loads(if(viewDidLoad))
I am trying to get 6 different views and be able to swipe left and right to next and respectively previous views. (similar to some image galleries)
as in default view is view1 swipe left go to view2.
what I have so far works fine but I am restricted by the 4 types of standard transitions Curl up/down and Flip left/right.
I need a transition slide Left/right to replace my current one.
How do I define a new one?
Do I need CG framework, or can I het away without using it?
Can I just do smth like
transition ***myTransition**
{
define transition
}
[UIView setAnimationTransition: **myTransition** forView:self.view2 cache:YES];
thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
阅读 UIView 和 CAAnimation https://developer. apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/CreatingViews/CreatingViews.html
https://developer.apple.com/library/ ios/#documentation/Cocoa/Conceptual/Animation_Types_Timing/Introduction/Introduction.html
https://developer.apple.com/library/ ios/#documentation/GraphicsImaging/Reference/CAAnimation_class/Introduction/Introduction.html
您可以使用此处给出的其他动画类型
Read UIView and CAAnimation https://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/CreatingViews/CreatingViews.html
https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/Animation_Types_Timing/Introduction/Introduction.html
https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Reference/CAAnimation_class/Introduction/Introduction.html
You can use other animation types as given here