walli
walli

Reputation: 37

UITextView starts in the middle of the text

How to edit UITextView to show the text from the first word and not from the middle of the text in storyboards?

enter image description here

Upvotes: 1

Views: 798

Answers (3)

Dharmesh Siddhpura
Dharmesh Siddhpura

Reputation: 1650

You can set the alignment in the storyboard itself as you can see in attached screenshot.

enter image description here

Upvotes: 0

VJVJ
VJVJ

Reputation: 443

Try this:

In Xcode->Open storyboard->Go to attributes inspector->TextView->Alignment->Choose left alignment.

If you want to make it by Code:

//textView.textAlignment = NSTextAlignmentLeft;

or

//[textView setTextAlignment:NSTextAlignmentLeft];

self.automaticallyAdjustsScrollViewInsets = false;

Upvotes: 2

Sagar Surani
Sagar Surani

Reputation: 25

Xcode->Open storyboard->Go to attributes inspector->TextView->Alignment->Use fourth option in alignment

Upvotes: 0

Related Questions