Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Self-Destructing Message iPhone App Using Parse.com as a Backend and Adding Users Logging In and Logging Out

Sonam Wangyal
Sonam Wangyal
2,208 Points

Back button issues

When I run the application and it loads up the Login Screen for the first time I can see the Back button still (just without the arrow sign and you cannot click it). The arrow and the 'Back' disappear once i login and logout.

Another thing is when I go to the signup page, the back button is no longer there, how do I get it to appear on the sign up page (But the back button is there after i login, then logout and go to the sign up page)

I don't know if what I had said makes sense, but any help is greatly appreciated, thanks! :)

2 Answers

Ugo Besa
Ugo Besa
6,209 Points

Perform everything in the prepareForSegue method (delete the navigationItem.hidesBackButton = YES; in the loginVC.m) by adding this lines:

[segue.destinationViewController setHidesBottomBarWhenPushed:YES]; segue.destinationViewController.navigationItem.hidesBackButton = YES;

Thank you! Best resolution!

You must make sure that you are properly implementing the navigation controller. Your code may be hiding it on some screens if the navigation controller is properly hooked in. Otherwise, if your view controllers are not associated with a navigation controller then you will not see a back button.