ios - Webview not constraining to bottom of view -
i'm having difficulty making webview stick bottom of it's superview. i'm resizing webview based on it's content height , "grow" while being constrained against bottom marker. can see mean these 2 images (webview blacked out):
i have tried few things. i'm using resizing webview, , attempting constrain it's superview.
func webviewdidfinishload(webview: uiwebview) { print("got here") webview.frame.size.height = 1 webview.frame.size = webview.sizethatfits(cgsizezero) let bottomconstraint = nslayoutconstraint(item: webview, attribute: .bottom, relatedby: .equal, toitem: webview.superview, attribute: .bottom, multiplier: 1, constant: 0) webview.superview!.addconstraint(bottomconstraint) }
unfortunately, webview still extends down opposed up. want webview against bottom of mapview, has it's bottom @ top of tab bar. suggestions?
Comments
Post a Comment