I have set the WKWebView
bottom constraint to super view but it won't display till super view instead displays content till safe area.
Here is the problem image that displays the bottom part doesn't fill properly.
And here is the hierarchy of view and constraints image
And code to setup WebView constraints with the container view
let wv = WKWebView(frame: containerView.frame, configuration: wvConfig)
webView = wv
containerView.addSubview(wv)
// setup constraints
wv.translatesAutoresizingMaskIntoConstraints = false
if #available(iOS 11.0, *) {
wv.trailingAnchor.constraint(equalTo: containerView.trailingAnchor).isActive = true
wv.leadingAnchor.constraint(equalTo: containerView.leadingAnchor).isActive = true
wv.topAnchor.constraint(equalTo: containerView.topAnchor).isActive = true
wv.bottomAnchor.constraint(equalTo: containerView.bottomAnchor).isActive = true
} else {
NSLayoutConstraint(item: wv, attribute: .top, relatedBy: .equal, toItem: containerView, attribute: .top, multiplier: 1.0, constant: 0).isActive = true
NSLayoutConstraint(item: wv, attribute: .leading, relatedBy: .equal, toItem: containerView, attribute: .leading, multiplier: 1.0, constant: 0).isActive = true
NSLayoutConstraint(item: wv, attribute: .trailing, relatedBy: .equal, toItem: containerView, attribute: .trailing, multiplier: 1.0, constant: 0).isActive = true
NSLayoutConstraint(item: wv, attribute: .bottom, relatedBy: .equal, toItem: containerView, attribute: .bottom, multiplier: 1.0, constant: 0).isActive = true
}
So, Can anyone rectify the issue here?
Some certain URL's works, but not for all. Why?