stleamist / BetterSafariView

A better way to present a SFSafariViewController or start a ASWebAuthenticationSession in SwiftUI.
MIT License
581 stars 57 forks source link

ColorScheme not working #43

Open Dave181295 opened 1 year ago

Dave181295 commented 1 year ago

Thanks for the lib, when passing color scheme (light/dark mode)

 .preferredBarAccentColor(Color.BackgroundColor)
  .preferredControlAccentColor(Color.TintColor)

The safariView colors wont update even when doing a new fresh launch

phoqe commented 1 year ago

Had to do this:

static func safariView(for url: URL) -> SafariView {
    return SafariView(
        url: url,
        configuration: SafariView.Configuration(
            entersReaderIfAvailable: true,
            barCollapsingEnabled: true
        )
    )
    .preferredControlTintColor(UIColor(named: "AccentColor"))
}

Also, look here: https://github.com/stleamist/BetterSafariView/issues/16