0

мое приложение показывает белую панель сверху на 4-дюймовый экран (= iPhone 5). Для iPhone 4 он работает красиво (белый индикатор не отображается). В чем проблема (iOS SDK 6.1)?Белый бар для iPhone 5 в симуляторе

Это, как я добавить UINavigationController:

self.navigationController = [[UINavigationController Alloc] initWithRootViewController: exploreViewController];

self.navigationController.navigationBar.tintColor = [UIColor greenColor]; 
self.navigationController.navigationItem.hidesBackButton = YES; 

[self.view addSubview:self.navigationController.view]; 

Бест, Стефан enter image description here

enter image description here

+1

Вы используете наконечник или раскадровку? – Polyov

+0

Я использую наконечник и добавляю UINavigationController программно. Я использую UINavigationController для отображения различных видов центра (розовый цвет) и UINavigationBar (зеленый цвет). – Stefan

+1

убедитесь, что вы настраиваете наконечник, чтобы быть дружественным к обоим размерам устройств. см.: http://stackoverflow.com/questions/13275144/how-to-make-xib-compatible-with-both-iphone-5-and-iphone-4-devices – Polyov

ответ

2

Изменить

[self.view addSubview:self.navigationController.view];

в

[self.window setRootViewController:self.navigationController];

Вы должны добавить контроллер навигации в свой AppDelegate. Here's a good tutorial.