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:
精彩评论