1

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]
];
4

1 に答える 1

0

ドキュメントによると:

http://developer.apple.com/library/ios/#documentation/MessageUI/Reference/MFMailComposeViewController_class/Reference/Reference.html

重要メール作成インターフェース自体はカスタマイズできないため、アプリケーションで変更しないでください。さらに、インターフェースを提示した後、アプリケーションは電子メールの内容にそれ以上の変更を加えることはできません。ユーザーは引き続きインターフェースを使用してコンテンツを編集できますが、プログラムによる変更は無視されます。したがって、インターフェイスを表示する前に、コンテンツフィールドの値を設定する必要があります。

于 2012-05-28T04:18:03.633 に答える