You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After this, there will be no more messages about breaking constraints. These breaking constraints won't affect to the user experience in any way, but in general, when I am working with something, I rather have it without errors/warnings if possible at any cost :)
Good work by the way, I made something similar and got a few good tips from your work.
The text was updated successfully, but these errors were encountered:
To fix constraint issues (messages in console), you should make following changes:
set cell's contentView's autoresizingMask to flexibleHeight in example where cell is instantiated.
and in PSHTMLView.swift, before activating webviewHeightConstraint, set it's priority to 999:
public var webView: WKWebView! {
didSet {
addSubview(webView)
webView.translatesAutoresizingMaskIntoConstraints = false
webView.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
webView.trailingAnchor.constraint(equalTo: trailingAnchor).isActive = true
webView.topAnchor.constraint(equalTo: topAnchor).isActive = true
webView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true
webViewHeightConstraint = webView.heightAnchor.constraint(equalToConstant: self.bounds.height)
webViewHeightConstraint.priority = UILayoutPriority(rawValue: 999)
webViewHeightConstraint.isActive = true
webView.scrollView.isScrollEnabled = false
webView.allowsBackForwardNavigationGestures = false
webView.contentMode = .scaleToFill
webView.navigationDelegate = self
webView.uiDelegate = self
webView.scrollView.delaysContentTouches = false
webView.scrollView.decelerationRate = UIScrollViewDecelerationRateNormal
webView.scrollView.delegate = self
}
}
After this, there will be no more messages about breaking constraints. These breaking constraints won't affect to the user experience in any way, but in general, when I am working with something, I rather have it without errors/warnings if possible at any cost :)
Good work by the way, I made something similar and got a few good tips from your work.
The text was updated successfully, but these errors were encountered: