I know programmatically I can set a child view controller's title and it will updated its related tab bar item's title but how do I set that up in Interface Builder?
Asked
Active
Viewed 302 times
1 Answers
0
Interface Builder doesn't have an exposed property for a view controllers title but it does allow you to set properties in the "User Defined Runtime Attributes" section under Identity Inspector tab. Just set the key path to title
, type to String
, and Value to your desired title. Also check out Apple's documentation. Or check out this blog for a visual walkthrough: http://ios-blog.co.uk/tutorials/user-defined-runtime-attributes/
You can also have finer grain control by setting these different properties:
self.navigationItem.title = @"my title"; //sets navigation bar title.
self.tabBarItem.title = @"my title"; //sets tab bar title.
self.title = @"my title"; //sets both of these.

Steve Moser
- 7,647
- 5
- 55
- 94