iOS 8 UIActivityViewController and UIAlertController button text color uses window's tintColor

In addition to the global tint color defined for your application, each view controller allows you to override the tint color for just that controller. In this case your best bet would be to set the tintColor on your UIActivityViewController after initializing but before presenting.

UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:activities];

//Set the tint color on just the activity controller as needed here before presenting
[activityController.view setTintColor:[UIColor blueColor]];

[self presentViewController:activityController animated:YES completion:nil];

If you are doing this a lot in your app you could use a subclass or a category to avoid code duplication.


This worked for me with the UIAlertController.

[[UIView appearanceWhenContainedIn:[UIAlertController class], nil] setTintColor:[UIColor blackColor]];