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 trialGustav Stromfelt
5,655 Pointsself.navigationItem.hidesBackButton = YES; removes functionality of the back button but does not remove button
I am following the Ribbit App development in Objective C and have just created add this code: self.navigationItem.hidesBackButton = YES; in the ViewDidLoad method in the LoginViewController.m file.
For some reason, the back button disappears and is replace by 'Ribbit' as non-functional text.
Happy to share more info, thanks for your help.
Adding a link to a screenshot for a bit of help: http://i.imgur.com/kDPxkL6.png
1 Answer
Jayden Spring
8,625 PointsThe back button would dissapear since you are setting hidesBackButton to true (YES) - when you say it is replaced by Ribbit - is this in the title section of the navigation bar (centered) or where the back button is?
From the jist of your question, the VC is doing exactly what you have told it to do - hide back button and still display a title.
Gustav Stromfelt
5,655 PointsGustav Stromfelt
5,655 PointsThe 'Ribbit' text is not centered - the title is present on the screen and the Back Button text has been turned into 'Ribbit'.
So essentially the back button functionality has been removed and the text has been replaced with the word 'Ribbit'
Here is an link to a screenshot: Screenshot image
Thanks for your help!
Gustav Stromfelt
5,655 PointsGustav Stromfelt
5,655 PointsAny thoughts?