user198725878
user198725878

Reputation: 6386

iPhone UIView animation

Grettings 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!

Upvotes: 2

Views: 1785

Answers (1)

Sam Ritchie
Sam Ritchie

Reputation: 11038

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!

Upvotes: 2

Related Questions