Change tab name in uitabbarcontroller

前端 未结 7 2115
离开以前
离开以前 2020-12-28 13:57

I have a TabBarController set as main controller tab, where names were defined using interface builder. Now I would like to change its names programmatically.

How c

7条回答
  •  一生所求
    2020-12-28 14:58

    This is how you can change the name and the image of the icon of a tab bar:

     self.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"Main Tab" image:[UIImage imageNamed:@"maintab.png"]] autorelease];
    

提交回复
热议问题