Reputation: 65
How can I change the image of Bar Button of emailcomposer in iPhone app? I am able to change the image of the Navigation Bar but I also have to change the image of Send and cancel button.
Upvotes: 0
Views: 1054
Reputation: 11779
the composer is presented modally as rootviewcontrolelr of a navigation controller.
If you change properties of UINavigationCar as well UIBarButtonItem with appearance
, it should do the trick
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.
Upvotes: 2
Reputation: 11026
Try accessing them through mailComposeViewController.navigationBar.items, which is an array of the bar items.
Upvotes: 0