开发者

How should i remove a tabbaritem from in TabbarController?

开发者 https://www.devze.com 2023-01-11 12:12 出处:网络
How should i remove a t开发者_JS百科abbarItem from UITabbar Controller, When i try do this, the whole tabbar removed instead of singletabbarItem remove?

How should i remove a t开发者_JS百科abbarItem from UITabbar Controller, When i try do this, the whole tabbar removed instead of single tabbarItem remove?

Sri


I think you can use -(void)setViewControllers:(NSArray*)viewContorllers animated:(BOOL)animated method.

From documentation about this method:

When you assign a new set of view controllers runtime, the tab bar controller removes all of the old view controllers before installing the new ones. When changing the view controllers, the tab bar controller remembers the view controller object that was previously selected and attempts to reselect it. If the selected view controller is no longer present, it attempts to select the view controller at the same index in the array as the previous selection. If that index is invalid, it selects the view controller at index 0.

http://developer.apple.com/iphone/library/documentation/uikit/reference/UITabBarController_Class/Reference/Reference.html#//apple_ref/occ/instm/UITabBarController/setViewControllers:animated:

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号