cofirazak
cofirazak

Reputation: 661

UITextView text alignment

After the show segue from UITableView to UITextView

show segue from UITableView

I have the following problem: If i clear constraints for the UITextView the result is, of course unsatisfied:

UITextView without constraints

But the good part of this – is starting from the first line at the top.

If I try to add suggested constraints to the UITextView I got this:

UITextView with suggested constraints

The problem is that the text begins not from the start.

What I need to get after segue page with text aligned to top like this:

enter image description here

Upvotes: 1

Views: 524

Answers (2)

Sergei Akimov
Sergei Akimov

Reputation: 21

You can add your own constraints to bottom bar. first you need to place your textview up the bottom bar enter image description here

Then add your own constraint to bar(drug with right button from textview on tabor).

enter image description here

Add vertical spacing

enter image description here

Then add other missing constraints

enter image description here

Result:

enter image description here

Upvotes: 1

Tokuriku
Tokuriku

Reputation: 1352

I believe embedding the textView in a scrollView will fix the issue and allow for the viewing of all the text.

Upvotes: 0

Related Questions