1

In my iOS 6 iPad app I am using the new UIActivityViewController. I would like the popup containing the options (facebook,twitter,email,etc...) to be black instead of the blue color it is normally. I have seen it done so I know it is possible but I'm not sure how to get it.

My code is:

UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:@[string,url] applicationActivities:nil];

shareOptions = [[UIPopoverController alloc] initWithContentViewController:activity];  

[shareOptions presentPopoverFromBarButtonItem:actionBarButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

doing activity.view setBackgroundColor provides a weird looking popup... any ideas?

My second problem with UIActivityViewController is that when I chose to share via email the navigation bar for the email sharing controller is the default. I would like this to be black as well. I am trying to use the newish [UINavigationBar appearance] class. I can get it to be black using

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

but this is not the UIBarStyleBlackOpaque that I am after.

[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackOpaque];

does not work

Thanks!

4

1 回答 1

0

在打开事件的内部UIActivityViewController

- (IBAction)openShareDialog:(id)sender {
[[UINavigationBar appearance] setBackgroundImage:[YOUR UIImage] forBarMetrics:UIBarMetricsDefault];

//Init UIActivityViewController
}
于 2013-01-26T06:43:04.927 回答