TextView in iOS 8, the navigation bar is above the text view

Hello, I am using iOS 8 (fast)

Now I have it

https://www.dropbox.com/s/tu9issn0b61aphh/IMG_1304.PNG?dl=0

But I need it so the textview shows the beginning of the text!

https://www.dropbox.com/s/0ggzndfr90vcrnj/IMG_1305.PNG?dl=0

I have tried many things but with no success!

I need your help?

+3


source to share


2 answers


In UIViewController

implement the following function

override func viewDidLayoutSubviews() {
    myTextView.setContentOffset(CGPointZero, animated: false)
}

      

Also in viewDidLoad

set the following property



automaticallyAdjustsScrollViewInsets = false

      

I'm not sure why this is happening, but it will prevent it from happening.

+2


source


In the Root View Controller Attribute Inspector, make sure "Under Top Bars" is not checked.



0


source







All Articles