I use view controller with embedded in navigation controller.
In this view I added scroll view and then content view inside scroll view
I added constrains for scroll view - zero for top, bottom, leading, and trailing. And the same for content view - zero for top, bottom, leading, and trailing. And I added width and height for content view the same as main view.
Inside content view I need to add different content (labels, text fields, buttons) - this will be settings screen with vertical scroll.
Now I see that content is always shifted down a bit (the same value as menu height)
How to make to located vertically on top?
And how to put all the content in the content view that should be vertically long and scrollable vertically?
I think you forget to remove tick -> Adjust scrollview insects .
Just add this line to the viewDidload
method of your ViewController.
self.automaticallyAdjustsScrollViewInsets = NO;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With