Gerardo
Gerardo

Reputation: 5830

Iphone Log Out from App problem

i have an application based on an navigation controller. At first, it presents a Modal View with the Log In interface. After the user logs in, i dismiss this view and present the rootViewController.

Then, in the nav bar i have a button in order to show the Profile view in wich i can log out.

The problem is the following. When i press log out in the Profile View i do two things:

But for a moment, i can see the pop action and the RootViewController before the Log In View is shown.

How can avoid this behavior?

Thanks

Upvotes: 0

Views: 244

Answers (2)

Penang
Penang

Reputation: 1305

You need to specify that you do not want to see the animation. Where are you popping the last view controller from?

It should probably be something like this [navController popViewControllerAnimated:NO];

Upvotes: 1

Fran Sevillano
Fran Sevillano

Reputation: 8163

Hey, I think you must have the animated flag either on - (void)dismissModalViewControllerAnimated:(BOOL)animated or on - (UIViewController *)popViewControllerAnimated:(BOOL)animated set to YES so you are actually able to see it switching views. If you change them to NO the "Log in" view will come up right away.

I hope this is useful for you.

Regards

Upvotes: 1

Related Questions