次のコードをviewdidloadメソッドに追加して変更するだけです。それともあなたもナビゲーションバー
if ([[UINavigationBar class]respondsToSelector:@selector(appearance)]) {
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"image.png"] forBarMetrics:UIBarMetricsDefault];
}
[[UINavigationBar appearance] setTitleTextAttributes:@{
UITextAttributeTextColor : [UIColor whiteColor],
UITextAttributeTextShadowColor : [UIColor blackColor],
UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake(1, 0)],
UITextAttributeFont : [UIFont fontWithName:@"System" size:25.0]
}];
希望に画像を置くことができ、このヘルプ
setTitleTextAttributesはiOS 5でのみ動作しますか? –
ご意見ありがとうございます!私はAPIをチェックして、titleTextAttributes関数が私が探しているように見えます。しかし、それはIOS5でのみ利用可能です。私はまだiPhone SDK 4.3を使用していますが、私はIOS5で利用可能な多くの機能を見つけているようです。私は開発者プログラムにサインアップして、これらの機能を試してみるかもしれません。 – RyzBeyond
このチュートリアルは、http://www.raywenderlich.com/4344/user-interface-customization-in-ios-5をご覧ください。 – Clarence