Santusura8
Santusura8

Reputation: 869

Animating Viewcontroller

I am working on a project were i need to hide the view and when I click on a button the view should appear, its some thing like animating the view in one view controller?

Thanks.

Upvotes: 0

Views: 95

Answers (1)

maheswaran
maheswaran

Reputation: 417

when clicking a button you will call a method, so in that method write the below code and you hide the view of you added in view. for example if you add a button means remove that.

[button.view removeFromSuperView];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5f];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:[self view] cache:YES];
[UIView commitAnimations];

Upvotes: 1

Related Questions