swift - Set UIView height to fit UILabel subview using autolayouts -


what try do

i have custom uiview uilabel subview in it. want uiview wrap uilabel height , set it´s height depending of text length. uilabel resizing it´s height correctly when adding text label.text. far good.

problem

the uiview not adjusting height uilabel content. text should inside white uiview below. should possible solve constraints, correct? can´t right though. can done purely storyboard or have manually set uiview height in code?

enter image description here

the result: enter image description here

try setting content hugging property of uilabel superview in interface builder 1000:

enter image description here


Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -