vinay
vinay

Reputation: 1316

how to make the animation between one view to another view in uitabbarcontroller

I want the animation between the two viewcontrollers in uitabbarcontroller.

I am having the two tabbar. The first one open by default when run the app.I want the animation,while i go to the second tabbar.How can i do this.

Thanks

Upvotes: 0

Views: 264

Answers (1)

C.Johns
C.Johns

Reputation: 10245

In the View Will appear of your firstViewController you should have something like

- (void)viewWillAppear:(BOOL)animated
{
     [super viewWillAppear:animated]; 

    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:1.0];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight
                           forView:self.view cache:YES];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
    [UIView commitAnimations]; 

}

Then in the secondviewcontroller have the same thing but UIViewAnimatinTransitionFlipFromleft

However let me know how this goes, because for some reason in the app I was making I had a little trouble on the view first transition then it would work fine after that. If you suffer from the same problem maybe we can work together for a solution.

Upvotes: 1

Related Questions