0

I'd like to change the color of the Edit Actions... button at the very bottom of the UIActivityViewController.

let activityViewController = UIActivityViewController(activityItems: items,
                                                      applicationActivities: nil)

This is what I was sure would be working, but it didn't:

activityViewController.view.tintColor = .green

These were further attempts. None worked as desired. The color didn't change.

activityViewController.navigationController?.navigationBar.tintColor = .green
activityViewController.tabBarController?.view.tintColor = .green
activityViewController.presentingViewController?.view.tintColor = .green
activityViewController.editButtonItem.tintColor = .green

What am I missing?

Neither SO, nor Google could help.

geohei
  • 696
  • 4
  • 15

1 Answers1

0

Please try to use below code while presenting activityViewController, I hope it works.

self.present(activityViewController, animated: true, completion: { () in
    UIBarButtonItem.appearance().tintColor = UIColor.systemBlue
    UINavigationBar.appearance().barTintColor = UIColor.white
})
Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278
  • Nope, this doesn't work for me (does it for you?). However I found the solution by changing the global tint color of the app. See [here](https://stackoverflow.com/a/68769156/3657691) – geohei Aug 26 '21 at 16:14