ナビゲーション バーの中央にカスタム ビューを追加しようとしています。次のコードを使用してテストしています。
UIView * testView = [[UIView alloc] init];
[testView setBackgroundColor:[UIColor blackColor]];
testView.frame = CGRectMake(0, 0, 100, 35);
[self.navigationController.navigationItem.titleView addSubview:testView];
ビューコントローラーのviewDidLoadメソッドでこれを設定していますが、プログラムを実行してもナビゲーションバーで何も変わらないようです。
これで私を助けてもらえますか?