0

Привет! Разрабатываю без storyboard, поэтому не знаю, как созданный ViewController установить стартовым. Спасибо

1 ответ 1

1

В AppDelegate.m

 self.window.rootViewController = [[TCDemoViewController alloc] init];
1
  • 1
    Немного более полный вариант: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = [[TCDemoViewController alloc] init]; [self.window makeKeyAndVisible]; return YES; } 25 окт 2013 в 14:06

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.