ML.
ML.

Reputation: 599

Getting rid of whitespace inside a TextView in Interface Builder

I have an issue on iOS devices larger than 4 inches.

enter image description here

As you can see, there is a large gap of whitespace at the bottom of my Text View. I am wondering how to clean it up to remove this whitespace using Interface Builder.

Upvotes: 0

Views: 338

Answers (3)

agibson007
agibson007

Reputation: 4373

Simply change your bottom constraint to >= current value instead of equal and the UITextView will start resizing provided scrolling enabled is unchecked.

Upvotes: 3

Arpit Dhamane
Arpit Dhamane

Reputation: 513

Auto - Resizing If you are using the auto-resizing for the text view then remove set the following setting for the auto-resizing tab.

This might be your settings, for the text view

enter image description here

Change it to the following setting,

enter image description here

Do not stretch the content of the text view, And if you are worried about the content not displaying in the set height then that is not an issue, there is a already a scroll in the text view controller, make sure that is enabled.

Auto - Layout If You are using Auto Layout in your app then set the constraints as shown in the below image on your text view,

enter image description here

Add these four constraints, Left, right, top and the height of the text view.

Upvotes: 1

Lucas Farah
Lucas Farah

Reputation: 1092

You just need to uncheck

Scrolling Enabled

enter image description here

enter image description here

Got the answers from here

Upvotes: 3

Related Questions