How to add tabbar items dynamically ipad
I am developing a开发者_高级运维n application for iPad as a splitview template based with uitabbarcontroller in my application. I have 10 tabbar items and the first time, I only want to show 4 tabbar items. After I navigate another view I want to remove the 4 original tabbar items and add new 4 tabbar items with new viewcontroller . How is this possible?
You should not modify the previous tab bar - you should set the previous tab bar to hidden. There's a post already on how to do this here.
Then, add a new tab bar controller into the new View Controller that is contained inside of the original tab bar controller's view controller array.
Although it is possible, I wouldn't recommend this, as it isn't really good UI practice. Have you explored any alternatives?
精彩评论