开发者

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

开发者 https://www.devze.com 2023-04-06 16:01 出处:网络
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 star

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

精彩评论

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