开发者

Customizing UItabBar Item order

I want to change the order of UITabBar items.

Then when I log in again, the order should be mainta开发者_如何学Cined.

How this can be done? Can anybody help me? I've wasted a whole day to implement this.


if you are willing to do it programmatically it should be fairly simple: Persist the index of each view and then add each view to an array in the same order doing load:

  //construct your view controllers somehow and add them to an array in the order you want them to be:
    [myArr addObject:viewCon1];
    [myArr addObject:viewCon3];
    [myArr addObject:viewCon2];

construct your tabbar using your array

_tabControl = [[UITabBarController alloc] init];
[_tabControl setViewControllers:myArr  animated:YES]; 
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜