iPhone, how I hide a tab bar button?

前端 未结 2 1257
庸人自扰
庸人自扰 2021-01-17 01:52

How do I hide an individual tab bar button ?

I\'ve searched and not found anything, only the full bar.

I\'ve made some progress but still having problems, th

2条回答
  •  灰色年华
    2021-01-17 02:21

    You would need to use setItems:animated: to do this. Create an array of the buttons you want to keep on the UITabBar and pass it to this instance method:

    [myTabBar setItems:itemsToKeep animated:TRUE];
    

    Reference: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITabBar_Class/Reference/Reference.html

提交回复
热议问题