Hiren
Hiren

Reputation: 12780

Tab Bar controller reload same page again

I am making an app of tabbar controller. In which I set login page as a first tabbar. I press login tab and done the login procedure. now when I again pressed first tab login it reload the page and again display the login page. i need to lock page after successful login. same problem in all tab.

Upvotes: 1

Views: 340

Answers (1)

Ben Mosher
Ben Mosher

Reputation: 13381

If you're using a navigation controller as your tab view, UITabBar will set it back the the root controller (the bottom of the stack) when the user taps the corresponding tab.

There are a number of ways to avoid this, one of the simplest being to remove the view controller you no longer need (your login page) from the navigation stack.

Upvotes: 1

Related Questions