Ниже приведен мой код, и он отображает панель вкладок только для данных двух элементов панели вкладок, но в других представлениях не отображается панель вкладок.Как показать панель вкладок во всех представлениях
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.startQuizViewController = [[StartQuizViewController alloc] initWithNibName:nil bundle:nil];
self.scoreViewController = [[ScoreViewController alloc] initWithNibName:nil bundle:nil];
self.startQuizViewController.title = @"QUIZ";
self.scoreViewController.title = @"SCORES";
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:self.startQuizViewController,self.scoreViewController,nil];
_navigationController=[[UINavigationController alloc]initWithRootViewController:self.tabBarController];
[self.window addSubview:self.navigationController.view];
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES;
код в письменной форме в didFinishLaunchingWithOptions
в AppDelegate.m.
Вы можете легко сделать все это без кода с помощью 'раскадровки'. И это также решит вашу проблему. –
Я использую конструктор интерфейса, предлагаю для того же –