How to set tab bar item title programmatically in objective c?

前端 未结 10 1364
猫巷女王i
猫巷女王i 2021-01-31 15:46

I want to set title to tab item programatically, but it not works. My code is below:

- (IBAction)tab1Click:(id)sender {
    myTabBarController = [[UITabBarContro         


        
10条回答
  •  清酒与你
    2021-01-31 16:00

    An easy way to do this : In your viewController2 's viewDidLoad method, set self.title = @"MyTitle";

提交回复
热议问题