¡@

Home 

2014/10/15 ¤U¤È 10:13:38

iphone Programming Glossary: savedtabsorderarray

How to: Save order of tabs when customizing tabs in UITabBarController

http://stackoverflow.com/questions/2034183/how-to-save-order-of-tabs-when-customizing-tabs-in-uitabbarcontroller

NSArray viewControllers changed BOOL changed int count mainTabBarController.viewControllers.count NSMutableArray savedTabsOrderArray NSMutableArray alloc initWithCapacity count for int i 0 i count i savedTabsOrderArray addObject NSNumber numberWithInt.. NSMutableArray savedTabsOrderArray NSMutableArray alloc initWithCapacity count for int i 0 i count i savedTabsOrderArray addObject NSNumber numberWithInt mainTabBarController.viewControllers objectAtIndex i tabBarItem tag NSUserDefaults standardUserDefaults.. objectAtIndex i tabBarItem tag NSUserDefaults standardUserDefaults setObject NSArray arrayWithArray savedTabsOrderArray forKey @ tabBarTabsOrder savedTabsOrderArray release As you can see I've been storing the order of tabs' indexes in an array..