Skip to content

Commit

Permalink
Dark navbar fix - iOS15/XCode13 (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
fdocr committed Nov 15, 2021
1 parent a75add2 commit afe8bd4
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ extension ForemWebView: WKScriptMessageHandler {
// Whenever a request to select an image is triggered via WKScriptMessageHandler
func handleImagePicker(_ message: [String: String], type: BridgeMessageType) {
let picker = imagePicker(message["ratio"])

// Dark NavigationBar temporary fix (iOS 15 + XCode13):
// https://github.com/Yummypets/YPImagePicker/issues/690#issuecomment-926587214
let navBarAppearance = UINavigationBarAppearance()
navBarAppearance.configureWithOpaqueBackground()
picker.navigationBar.scrollEdgeAppearance = navBarAppearance

picker.didFinishPicking { [unowned picker] items, _ in
// Callback for when the native image picker process is completed by the user
if let photo = items.singlePhoto {
Expand Down

0 comments on commit afe8bd4

Please sign in to comment.