How to animate the view transition left to right(Similar push view). When i click the button, the view should be transited from left to right. So please guide me and give some sample links.
Thanks.
How to animate the view transition left to right(Similar push view). When i click the button, the view should be transited from left to right. So please guide me and give some sample links.
Thanks.
To animate from left to right you can use the below block of code
You can also add animation from right to left like this:
Suppose that you want to push view2 from the right to replace view1.
Then (optionally) implement this method to remove view1 from the view hierarchy:
In that animation delegate method you may also want to release view1 and set its reference to nil, depending on whether you need to keep it around after the transition.
Another option is to use blocks for animation with less line of codes and for simplicity:
Here is the sample