2

I'm trying to set the colour of the cancel buttonBarItem to white on the Message / Mail activityItems presented with the UIActivityViewController but whatever I do it doesn't change them.

The cancel remains the standard default blue used in iOS7 as do other items in these views that ideally I would like to change. I've tried using the code below in the AppDelegate which sets the colour correctly throughout the rest of the app but it doesn't work when these views are presented.

[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];

These settings do retain their values when added to AppDelegate and these views are presented as can be seen below.

[[UINavigationBar appearance] setBarTintColor:SOLIDTEALCOLOR];
[[UINavigationBar appearance] setTitleTextAttributes:@{ NSForegroundColorAttributeName: [UIColor whiteColor]}];

Navigation bar colour issues

Do I need to roll my own ActivityViewController using bespoke SLComposeViewControllers for each activityItem to have this degree of control this colour? It seem like an unnecessary large amount of work for something that really shouldn't be an issue.

Jim
  • 890
  • 2
  • 10
  • 22
  • Check this one out: http://stackoverflow.com/questions/19985270/ios-7-uinavigationbar-appearance-not-working-first-time It may be that you've already presented the view and therefore it's not changing. – brandonscript Mar 27 '14 at 23:38
  • I don't think that's the case. Setting this item on the AppDelegate is supposed to be universal to the app. The view is presented a long time after it has been set. I think this is a bug according to this question [link](http://stackoverflow.com/questions/21104666/uinavigationbar-appearance-on-modal-not-setting?rq=1) – Jim Mar 28 '14 at 00:37
  • Oh, yeah, ok so something else is going on. Are you doing this in IB? Is it properly connected? – brandonscript Mar 28 '14 at 01:52
  • It's IB connected to code which calls [self presentViewController:activityVC animated:YES completion:nil]; It has no other issues. I wish there was an equivalent to the completion callback when presenting the ActivityVC at was exposed for tailoring the ActivityItem views. It would make things so much easier. – Jim Mar 28 '14 at 10:57
  • Hrm. Yeah no kidding! I'm stumped :-/ – brandonscript Mar 28 '14 at 15:33
  • I think it might have something to do with an inheritance issue and subviews of UIActivityViewController automatically changing due to UIViewTintAdjustmentModeAutomatic being called to dim the background. I'll see if there's a way to fix it if not I'll file a bug. – Jim Mar 28 '14 at 17:48

0 Answers0