6

I understand that the code below changes the SFSafariViewController's tint color, but how do you change the background color of the navbar and tabBar?

SFSafariViewController *safariViewController = [[SFSafariViewController alloc] initWithURL:webpageUrl];
[safariViewController.view setTintColor:[UIColor blueColor]];

To clarify I want to change the semi-transparent white color to dark green?

enter image description here

Any help on this matter would be greatly appreciated.

Thanks!

Adam Cooper
  • 867
  • 1
  • 6
  • 23

2 Answers2

4

SFSafariViewController, as of iOS 10 SDK, has the preferredBarTintColor and preferredControlTintColor properties to control the tint color of bar items and the bars themselves, respectively.

Léo Natan
  • 56,823
  • 9
  • 150
  • 195
1

This is a known problem with the current SFSafariViewController implementation in iOS 9.0. A radar is filed under http://www.openradar.me/22947521

lahmar
  • 110
  • 1
  • 6