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)];
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)];
you can try this
yourTextView.contentInset = UIEdgeInsetsMake(-4,-8,0,0);
OR
yourTextView.textAlignment = UITextAlignmentLeft;
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