Cake
Cake

Reputation: 318

Return to root view controller (storyboard)

My app works with storyboards. When the app launches, it loads ViewController1 (with the arrow thing in storyboards). After logging in it pops to a navigation controller. However, I have this button in here which should bring me back to the initial view controller from the storyboard. How should I do this? This doesn't work:

[(UINavigationController *)self.view popToRootViewControllerAnimated:NO];

Upvotes: 1

Views: 197

Answers (1)

drc
drc

Reputation: 1915

Try this: [self.navigationController popToRootViewControllerAnimated:TRUE];

Upvotes: 1

Related Questions