2012-08-01 7 views

답변

0

Xcode에 따라 4.3.3 탭 응용 프로그램을 만들면 두 개의 ViewController가 제공됩니다. 당신은 더 추가하려는 경우 그래서 당신은 AppDelegate에 갈 수 있으며

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions(NSDictionary *)launchOptions 
{ 
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 
// Override point for customization after application launch. 
UIViewController *viewController1 = [[[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil] autorelease]; 
UIViewController *viewController2 = [[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil] autorelease]; 
self.tabBarController = [[[UITabBarController alloc] init] autorelease]; 
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil]; 
self.window.rootViewController = self.tabBarController; 
[self.window makeKeyAndVisible]; 
return YES; 
} 

볼 수 있습니다 그리고 당신은 tabBarController에 추가 된 두 가지의 ViewController를 볼 수 있고 당신은 새로운 하나를 만들어 1 또는 2가 추가 된 것처럼 초기화를 추가 할 수 있습니다. 시도 .......

0

다음은 귀하의 답변을 해결할 것으로 믿는 비디오입니다 : here.

그러나 '최고'는 주관적인 문제 일 수 있습니다. Berry M의 설명에 따라 'storyboarding'을 사용하거나 코드 경로로 이동하십시오.