0

It seems like there is no Apple permitted way to change the color of a uiactivityviewcontroller. I am creating it in my iPad app like this:

UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:@[@"test"] applicationActivities:nil];
shareOptions = [[UIPopoverController alloc] initWithContentViewController:activity];  
[shareOptions presentPopoverFromBarButtonItem:actionBarButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

This currently presents the popover with a blueish background color. I have seen a black background color used so I know it is possible. Another developer mentioned to me he thought on the iPhone at least it appears to be determined by the status bar color (as setting the status bar color to black opaque in the info.plist made the activityview black). This did not seem to have an effect on the iPad version. Does anyone have any ideas/suggestions?

Thanks!

UPDATE: Setting activity.view.backgroundColor yields a weird result where most of the view is the set color but the edges are still the original blue

UIActivityViewController Weird Background

3
  • Have you tried setting activity.view.backgroundColor? Commented Jan 5, 2013 at 3:49
  • @CarlVeazey Yes please see new description for an image of the result Commented Jan 5, 2013 at 3:58
  • Have you tried using a custom UIPopoverBackgroundView class (via the popoverBackgroundViewClass property of the popover controller)? Commented Jan 5, 2013 at 4:01

1 Answer 1

2

That's mentioned on the WWDC 2012 Video : Session 200 - What's new in Cocoa Touch. The blueish part is a default layover you can deactivate with

UIPopoverBackgroundView +(BOOL)wantsDefaultContentAppearance
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.