It was possible to change the text color of the Send and Cancel buttons that are on the UINavigationBar in the MFMailComposerViewController (both Send and Cancel ) and MFMessageComposeViewController ( Cancel only) if they are presented from the UIActivityViewController .
Using the UIActivityViewController, click on Message or Mail :

You will notice that the default text color for the Send and Cancel buttons is blue:

To change this, in the AppDelegate.m class, in the AppDelegate.m method didFinishLaunchingWithOptions insert the following line:
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTintColor:[UIColor whiteColor]];
It leads to:

You can also use other colors, for example:
[UIColor purpleColor];

[UIColor greenColor];

How did I check this? I noticed that this solution works for the following:
- with Xcode 5.1 in iOS 7.1-simulator, creating as basic iOS SDK 7.1 (you can choose from the project file selection → Build settings → Basic SDK. Also selected from General → Deployment target → 7.1)
- from Xcode 5.1 to iPhone 4, creating as the basic iOS SDK 7.0 (can be selected from the project file selection → Build settings → Basic SDK. Also selected from General → Deployment target → 7.0)
- from Xcode 5.1 to iPhone 4, creating as the basic IOS SDK 7.1 (can be selected from the project file selection → Build settings → Basic SDK. Also selected from General → Deployment target → 7.1)
This did not work when testing with
- with Xcode 5.1 in the iOS 7.0 simulator, creating as the base iOS SDK 7.0 (can be selected from the project file selection → Build settings → Basic SDK. Also selected from General → Deployment target → 7.0)
Therefore, it should be safe to use, since I believe that the behavior on the device itself is greater than the behavior in the iOS simulator. If anyone knows why it doesn’t work in iOS 7.0 simulator, I would like to know. :)
Alex Apr 12 '14 at 19:34 2014-04-12 19:34
source share