简体   繁体   English

如何在iPhone中自定义Email Composer的导航栏

[英]How to customize Navigation Bar of Email Composer in iPhone

How can I change the image of Bar Button of emailcomposer in iPhone app? 如何在iPhone应用程序中更改emailcomposer的Bar Button图像? I am able to change the image of the Navigation Bar but I also have to change the image of Send and cancel button. 我可以更改导航栏的图像,但我还必须更改发送和取消按钮的图像。

the composer is presented modally as rootviewcontrolelr of a navigation controller. 作曲家以模态方式呈现为导航控制器的rootviewcontrolelr。

If you change properties of UINavigationCar as well UIBarButtonItem with appearance , it should do the trick 如果你改变UINavigationCar的属性以及带有appearance UIBarButtonItem,它应该可以解决问题

UIBarButtonItem *barbuttonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonItemStyleBordered target:nil action:nil];

if ([barbuttonItem respondsToSelector:@selector(setTintColor:)]) {
    [[UIBarButtonItem appearance] setTintColor:kUIBarButtonItemTitleColor];
}

But keep in mind that this will change all bar button items not only the ones in mail composer. 但请记住,这将改变所有栏按钮项目,而不仅仅是邮件编辑器中的项目。

尝试通过mailComposeViewController.navigationBar.items访问它们,这是一个条形项的数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM