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 trialVincent K
3,356 PointsHow do you set title to navigation Item (I'm using Xcode 6)?
Have found the tutorials in this stage and project the best so far in iOS programming.
Just an issue with adding title 'Ribbit' to all of the Navigation bars.
I can add it just fine for the Inbox view controller, but then for the two other view controllers, that is the log in view controller, and the sign up view controller, I can't find the navigation item part in the attributes inspector for these to set the title as Ben was able to do in the video.
I can see the navigation bar in all of my view controllers so it does seem that I have linked them correctly. When I click on the navigation bar of the other two view controllers, log in, and sign up, I can double click and type text in, but text doesn't save?
Has this been changed in Xcode 6 or am I still doing something wrong?
5 Answers
Vincent K
3,356 PointsOk! For anyone else wondering about this, I got a solution by changing the title by selecting navigation items individually via outline view. Happy days!
obey me
1,135 PointsTo write to A navigation title first you have to embed the the view controller then click on the Barcontroller
Vincent K
3,356 PointsI did that though, I embedded the inbox table view controller in a navigation controller. I have looked again and I can see the navigation controller in my storyboard and how it is directed at the inbox table view controller.
Then I have the table view controller linked to the log in view controller via the showLogin segue, and then the login view controller is linked to the sign up view controller via the control manual segue going from the sign up button to the sign up page.
I successfully set the title in the navigation bar of the inbox view controller but I can't do it for the other two items. I'm pretty sure I followed the video all the way- is there any chance that this is an Xcode 6 issue?
Bogy Yordanov
1,898 PointsI would really like to know this too because I am having the same issue. I even trashed the entire project and did it all over following the directions step by step and it just does not seem to want to let me add a title to the navigation bars on the login and sign up view controllers
thelontx
Courses Plus Student 2,054 PointsI have been having the same issue and I think I found something of a reason and a workaround.
It appears that the segue type of "push" has been deprecated in Xcode 6. Now, "Show" is the recommended substitute for "push". The tutorials appear to have been made before this change.
When I created my Ribbit project, I used "show", but could not figure out how to get the "Ribbit" title to show in the NavBar of the Login or SignUp views.
To fix, I changed the segue type to "push" and then I changed it back to "show". Now, the Nav Bar is selectable on the Login and SignUp views. I can now manually type in the same "Ribbit" title for these views.
I looked a little bit in the documentation. It looks like there is a UINavigationItem property called titleView. I'm not sure if something different could be done with this more formally. It still seems to indicate it is only visible if it is the top item in the stack.
Ryan Christensen
1,945 PointsYou could use self.title.text = "whatever you want"
in the viewWillAppear