开发者

iPhone UIView animation

Gr开发者_高级运维ettings to you...

i want to paginate when the user swipe on the left or right side of the uiview

i am able to detect the swipes using UISwipeGestureRecognizer.

now what i am trying to do is when the user is swiping i want to give slide animation.

currently i have the below code

[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft, forView:[self cardView] cache:YES];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.5];

this gives me the flip effect when i swipe on the view.

Please provide me some example or links to try the slide effect when swipe on the view.

Many Thanks!


You're going to want to use a UIScrollView, not a straight UIView. This has support for swipes and paging. Here's a nice tutorial to get you started. Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜