开发者

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 bu开发者_StackOverflow社区tton 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:

  • Present a new Modal View with the log in screen.
  • Pop the profile view controller.

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


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];


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜