HomeiOS Developmentios - White line between standing bar and WebView on iPhone 14...

ios – White line between standing bar and WebView on iPhone 14 Professional/Professional Max


I put a WebView inside my app, as you possibly can see from the picture every thing works wonderful on iPhones with the notch (I attempted on each iOS 15 and 16), whereas on the brand new 14 Professional and Professional Max there’s a white line that seems between the top of the standing bar and the start of the WebView. I believed it may be a bug within the Simulator, however i am not so certain… Is there some strategy to disguise that line with out messing with the opposite gadgets?

Right here is the code I am utilizing:

import Basis
import SwiftUI
import WebKit

struct WebView: UIViewRepresentable {
    
    let url: URL
    
    func makeUIView(context: Context) -> some UIView {
        let webView = WKWebView()
        let request = URLRequest(url: url)
        webView.load(request)
        return webView
    }
    
    func updateUIView(_ uiView: UIViewType, context: Context) {
        
    }
}

struct SearchView: View {
    
    let sysLanguage = NSLocale.present.languageCode
    
    var physique: some View {
        if sysLanguage == "it" {
            WebView(url: URL(string: "https://www.vivibusso.app/webapp_test/it/search.html")!)
                .navigationBarHidden(true)
        } else {
            WebView(url: URL(string: "https://www.vivibusso.app/webapp_test/it/search.html")!)
                .navigationBarHidden(true)
        }
    }
}

struct SearchView_Previews: PreviewProvider {
    static var previews: some View {
        SearchView()
    }
}

1

Thanks!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments