Android Wrap content equivalent in story board in iOS?
Android Wrap content equivalent in story board in iOS?
I am trying to build a UI in iOS
Now, the way I set up constraint is that Button and Images have constant width and height, and my UITextView, have equal width and leading edge set.
And now story board is complaining that my uiTextVIew doens't have a height.
My question is, since the content inside my uitextview is dynamic, and depending on the screen width, i believe it may fit more text per line or less.
Is there a height="wrap_content" equivalent in iOS storyboard that I could set to that text view?? Or is this something actually that I have to do in the code???
Thanks
1 Answer
1
Nope , there is no content-wrap equivalent in IOS , you have to give that textView an inital height in IB , then hook that height as IBOutlet and whenever you set a text to it do
IBOutlet
textViewHeight.constant = textView.contentSize.height
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
They should have something on storyboard that just does this under the hood.. But ok i'll take this =D
– user1017674
Jul 1 at 1:52