2012-03-14 11 views
0

をクリックして、私はボタンのUITabBarController項目のテキストを更新する。このようにクリックしてください:更新テキスト

enter image description here

私はそれをどのように行うことができますか?

答えて

0

UIViewControllerは、タブバー(UITabBarController)へのポインタであるプロパティtabBarControllerを持っています。その後、タブバーでナットを締めてください。現在のviewControllerのタブバー項目が必要な場合は、UIViewControllerのプロパティーはtabBarItemです。

+0

は申し訳ありません取得するには、あなたは私のデモを与えることができますか? –

1
for(UITabBarItem *tabBarItem in [self.tabBarController.tabBar items]) 
{ 
    NSLog(@"%@", tabBarItem.title); 
    //here u can change title 
    //tabBarItem.title = @"some title"; 
} 

または現在のタブのタイトルへのアクセスも

NSLog(@"%@", self.tabBarController.tabBar.title); 
関連する問題