I have a navigation bar that uses white tint color on a dark background color. I use UIActivityViewController
to share a link with the iOS share sheet.
When I select WhatsApp or Messages app to share the content the navigation buttons have the default blue tint color. Also the searchbar (in the case of WhatsApp) has a gray tint color which really makes it hard to read.
I couldn't manage to change the tint color. My code:
let textToShare = "Visit my website!"
if let myWebsite = NSURL(string: "http://google.com") {
let objectsToShare = [textToShare, myWebsite]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
self.presentViewController(activityVC, animated: true, completion: {
activityVC.navigationController?.navigationBar.tintColor = UIColor.whiteColor()
activityVC.navigationController?.navigationItem.rightBarButtonItem?.tintColor = UIColor.whiteColor()
activityVC.navigationController?.navigationItem.leftBarButtonItem?.tintColor = UIColor.whiteColor()
})
}
Any ideas?
Edit:
This is not a duplicate question because it is not about the button tint color of the activity view controller. It is about the button color of the navigation controller of the view controller that is shown after e.g. share on iMessage is pressed.