iPhone one title for all view controllers

后端 未结 4 637
天涯浪人
天涯浪人 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:31

    Try something like this (i don't have access to Xcode atm so please debug it first):

    for (int i = 0; i < [[tabBarController viewControllers] count]; i++) {
        [tabBarController objectAtIndex:i].title = @"This is the title";
    }
    

提交回复
热议问题