Reputation: 6680
this is how I've adjusted an UITextView
using the interface builder. It is latched showing the blue dashed lines in order to apply the default padding.
And this is how it looks at runtime on an iPhone 5 and 6:
Upvotes: 1
Views: 98
Reputation: 40028
You have to add leading and trailing constraints that would keep the view from resizing to fit its content.
Then, the layout might be still ambiguous. This is indicated by orange color. You can add the missing constrains manually or let Xcode do it for you. Here is how to do it:
I recommend investing around 20-30 minutes in reading any tutorial on auto layout. It's worth it. The concept is very simple and it's easy to understand.
Upvotes: 1
Reputation: 11
I think you're using the Auto Layout feature. You can check out this by clicking on the root view in the interface builder and watch the autolayout checkmark on the component inspector panel .
If the autolayout is enabled you need to add constraines for your UITextView. Hope this link will be helpfull: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/WorkingwithConstraints/WorkingwithConstraints.html
Upvotes: 1