0

アプリケーションに3つのタブバーアイテムを持つUITabBarがあります。

3つのタブバーアイテムすべてを表示したい場合もあれば、3番目のタブバーアイテムをタブバーから非表示にしたい場合もあります。

私を助けてください

4

1 に答える 1

3

setItems:animated:メッセージをUITabBarに送信します。例えば:

// get array of current UITabBarItem objects
NSMutableArray *tabBarItems = [tabBarViewController.items mutableCopy];

// modify the array (remove or add UITarBarItem objects as appropriate) here

// animate the changes to the UITabBar
[tabBarViewController.tabBar setItems:tabBarItems animiated:YES];
于 2009-11-04T07:27:48.813 に答える