iPhone one title for all view controllers

后端 未结 4 589
天涯浪人
天涯浪人 2021-01-25 00:51

I have an app with tab bar controller (with 4 views controller) and it contains a navigation controller. All of this was create programmatically. My question: Is there a way how

4条回答
  •  终归单人心
    2021-01-25 01:18

    If you know that there will be exactly 4 views controller, just do self.title = @"your title"; If you want to change "your title" once and have them all changed, just create a static global or use plist. And put the code under viewDidAppear so that it refreshes every time. No need to do anything too complex :)

提交回复
热议问题