开发者

The correct place to set the UINavigationController's back button title

I'm a bit confused with setting the title of navigation item's back button. Usual this is done in the viewDidLoad but in my case the view controller is created without the view being loaded. On startup, I'm restoring the view controller hierarchy and pushing view controllers to the navigation controller and only the top view controller's view is loaded. Since the previous view controller's view isn't loaded, I can't use viewDidLoad to set the back button's title.

The other thing I'm wondering if I restore the hierarchy the right way. I have pretty similar implementation to the Apple's DrillDownSave example.

The view 开发者_StackOverflow中文版controller is created programmatically, so awakeFromNib shouldn't work either. What is the right place for setting up the back button (and the title)?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜