-1

xCodeでTabBarのタブをプログラムで並べ替える方法はありますか?

どうもありがとう、マッテオ!

4

1 に答える 1

1

これを試して:

- (void)applicationDidFinishLaunching:(UIApplication *)application {

   tabBarController = [[UITabBarController alloc] init];

   MyViewController* vc1 = [[MyViewController alloc] init];
   MyOtherViewController* vc2 = [[MyOtherViewController alloc] init];

   NSArray* controllers = [NSArray arrayWithObjects:vc1, vc2, nil];
   tabBarController.viewControllers = controllers;

  // Add the tab bar controller's current view as a subview of the window
  [window addSubview:tabBarController.view];
 }
于 2013-03-15T17:59:30.760 に答える