UIActivityViewController: hue color of presented view controllers

In the application, I use white as the primary color of the hue. If the user opens the UIActivityViewController , I set the hue color for the controller to the standard blue iOS. This is great for the activity itself, but when you want to send mail, the color is not blue, but white again.

It would be great to have a way to set the color of the shades of the presentations. There is one?

Opening the MFMailComposeViewController and setting the hue color to blue also affects the displayed UIActionSheet , not so if the MFMailComposeViewController opened from the UIActivityViewController .

See screenshots for further details: http://i.imgur.com/OggykJF.png

Edit: This is what I do to add a hue color to the UIActivityViewController :

UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:activities]; activityController.view.tintColor = [UIColor blueColor]; [self presentViewController:activityController animated:YES completion:nil];

+7
ios objective-c xcode swift
source share
3 answers

The best thing you can do is set the hue color of the window to blue or any hue color you want on the UIActivityViewController before presenting it, and then change the hue of the window to the original immediately before it is fired. This will work. Here is how I do it:

 UIApplication.shared.keyWindow?.tintColor = Styles.color.systemBlue 

and then

 UIApplication.shared.keyWindow?.tintColor = Styles.color.tint 
+1
source share

I was not able to get this to work at all, but did you consider an alternative - leaving the text white and changing the background color in the navigation bar so that they appear, for example. from:

  UINavigationBar.appearance().backgroundColor = .black 

This is similar to the buttons on the navigation bar for the sharing screens via Mail and Twitter.

0
source share

Install tintColor on your UIActivityViewController after initialization, but before view.

 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]; 
-one
source share

All Articles