gpt4 book ai didi

iphone - 如何使用 UIAppearance 在 UINavigationBar 上设置提交按钮的样式?

转载 作者:行者123 更新时间:2023-11-28 17:32:38 26 4
gpt4 key购买 nike

我正在使用 UIApperance 设计我的 iOS 应用程序的样式.我已经成功地制作了我所有 UINavigationBar 中的所有栏按钮项目。 s 有灰色文本,除了一个特定的按钮 - MFMessageComposeViewController View 的发送按钮保留为默认的白色。为什么我的代码针对除此按钮之外的所有按钮?

enter image description here

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

最佳答案

根据文档:

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

Important The mail composition interface itself is not customizable and must not be modified by your application. In addition, after presenting the interface, your application is not allowed to make further changes to the email content. The user may still edit the content using the interface, but programmatic changes are ignored. Thus, you must set the values of content fields before presenting the interface.

关于iphone - 如何使用 UIAppearance 在 UINavigationBar 上设置提交按钮的样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10778946/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com