-3

I'm trying to set content offset of uitextview, but if it's big - it isn't working. Have you any ideas?

My code

[myTextView setText:@"very long .... text"];
[myTextView setContentOffset:CGPointMake(0,4000)];
werbary
  • 1,105
  • 2
  • 14
  • 43

2 Answers2

0

you can try this

yourTextView.contentInset = UIEdgeInsetsMake(-4,-8,0,0);

OR

yourTextView.textAlignment = UITextAlignmentLeft;
codercat
  • 22,873
  • 9
  • 61
  • 85
-1

Usually we doesn't need to set content offset. if the text in textview is more it will automatically creates scroll property in it . Textview size will be same but the text in it is scrollable. if it is not scrolling make sure UITextViewDelegate is set

Kumar KL
  • 15,315
  • 9
  • 38
  • 60
Charan Giri
  • 1,097
  • 1
  • 9
  • 15