Amitay Amitay - 2 years ago 119
Swift Question

UITextView contentOffset is set

I have done my research and couldn't find a solution that fixed the problem.

I have set

self.automaticallyAdjustsScrollViewInsets = false

I have a uitextview and i am setting the text on the viewDidLoad.

When the view appears, the textview appears partially scrolled.

If i breakpoint on the ViewDidAppear i see the the contentOffset.y is set but changing the text in textview results in a different contentOffset.

I'm using autolayout and i think that the constraints may be causing the problem.

The only code i have is setting the text in the uitextview

enter image description here

Answer Source

i deleted the controller in the storyboard and rebuilt it and it just works now..

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download