UIApperanceを使用して iOS アプリをスタイリングしています。すべてのUINavigationBar s のすべてのバー ボタン項目をグレーのテキストにすることができました。ただし、特定の 1 つのボタンを除きます。MFMessageComposeViewControllerのビューの送信ボタンは、デフォルトの白色のままです。コードがこのボタン以外のすべてのボタンを対象とするのはなぜですか?
NSDictionary* normalStyle = [NSDictionary
dictionaryWithObjects:[NSArray
arrayWithObjects:
[UIColor navigationTextNormalColor],
[UIColor whiteColor],
[NSValue
valueWithUIOffset:UIOffsetMake(
0,
1
)
]
, nil
]
forKeys:[NSArray
arrayWithObjects:
UITextAttributeTextColor,
UITextAttributeTextShadowColor,
UITextAttributeTextShadowOffset,
nil
]
];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationController class], nil]
setTitleTextAttributes:normalStyle
forState:UIControlStateNormal
];
[[UINavigationBar appearanceWhenContainedIn:[UINavigationController class], nil]
setTintColor:[UIColor navigationBarTintColor]
];