My app uses this line below to change all buttons to use this certain color. It also turns the buttons in my SFSafariViewController the same color which looks awful. However I cant find a good way to fix this. The only way I did it was the code below but there is an issue after it.
[[UIButton appearance] setBackgroundColor:[Helper getColor:self.application.color]];
Works because of the setBackgroundColor, but once I am done with the browser and go back to the app all my buttons are clear.
[[UIButton appearance] setBackgroundColor:[UIColor clearColor]];
SFSafariViewController *safariViewController = [[SFSafariViewController alloc]initWithURL:[NSURL URLWithString:self.message.filePath]];
[self presentViewController:safariViewController animated:true completion:nil];
This didnt work either.
[[UIButton appearanceWhenContainedIn:[SFSafariViewController class], nil] setBackgroundColor:[UIColor clearColor]];
There has to be an easier way to do this. You can see the color of the app is orange and does not look good below in the Safari Browser.