1

I am using this code in my app to share a URL to other apps using share extension.

  NSArray *activityItems = @[adURL];
  UIActivityViewController *activityViewControntroller = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
  activityViewControntroller.excludedActivityTypes = @[];

  if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    activityViewControntroller.popoverPresentationController.sourceView = self.view;
    activityViewControntroller.popoverPresentationController.sourceRect = CGRectMake(self.view.bounds.size.width/2, self.view.bounds.size.height/4, 0, 0);
  }

  [self presentViewController:activityViewControntroller animated:true completion:nil];

When WhatsApp is selected I get a view like this: enter image description here

Is there any way I can change the color of the right 'Send' button in the navigation bar?

Abdullah Umer
  • 4,234
  • 5
  • 36
  • 65
  • The solution from https://stackoverflow.com/a/47064914/3641812 helped me solve this problem. – ricardopereira Jul 22 '20 at 13:16
  • Does this answer your question? [Wrong textColor in buttons when sharing with Whatsapp via UIActivityViewController](https://stackoverflow.com/questions/44650061/wrong-textcolor-in-buttons-when-sharing-with-whatsapp-via-uiactivityviewcontroll) – ricardopereira Jul 22 '20 at 13:18

1 Answers1

-1

You can set this property on the modal before opening, something like the following

 modal.navigationController.navigationBar.barTintColor = ...

This will change the navigationBar color, you can select your app color there,, this will make send button prominent automatically.

aBilal17
  • 2,974
  • 2
  • 17
  • 23