ナビゲーションコントローラーをベースにしたアプリタブがあります。
ナビゲーション バーのタイトルは、タブのルート ページで問題なく表示されます。
しかし、別のView Controllerを上に押すと、このビューのタイトルを設定できません
これは、ルート ページとプッシュされたページに使用するコードです。
- (void)viewDidLoad
{
[super viewDidLoad];
UILabel *lava = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 44)]autorelease];
lava.backgroundColor = [UIColor clearColor];
lava.text = @"About us";
lava.textAlignment = UITextAlignmentCenter ;
lava.textColor = [UIColor whiteColor];
lava.font = [UIFont fontWithName:@"DroidSans-Bold" size:(46)];
lava.shadowColor = [UIColor blackColor];
lava.shadowOffset = CGSizeMake(2, 3);
self.navigationItem.titleView = lava;
}
では、ナビゲーション バーにタイトルを設定するには何が欠けていますか?
ありがとう!