Я пытаюсь добавить пользовательский вид в центре панели навигации в iOS5, и я использую следующий код для его проверки:
UIView * testView = [[UIView alloc] init];
[testView setBackgroundColor:[UIColor blackColor]];
testView.frame = CGRectMake(0, 0, 100, 35);
[self.navigationController.navigationItem.titleView addSubview:testView];
Я устанавливаю это в методе viewDidLoad моего контроллера представления, но когда я запускаю свою программу ничего не меняется в моей навигационной панели.
Не могли бы вы мне помочь?
Большое спасибо.