iPhone + UITabBar
问题描述:
答
发送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];
如果创建一个NSArray,我该如何修改它(添加/删除它的对象),因为它不可变。 – pratik 2009-11-13 11:00:58
我更新了代码以使用NSMutableArray。 – gerry3 2009-11-13 16:34:55