I have a UIScrollView
under a navigationbar in a detail viewcontroller.
The viewcontroller settings are the following:
The scrollview is pinned to the Safe Area
(trailing
, leading
, bottom
, top
= 0
).
I want to put the entire scrollview below/under the navigationbar, so that, if I make the navigationbar transparent, I can see the scrollview pinned to the top border of the device (while, at the moment, the scrollview area top corresponds to the bottom border of the navigationbar). The navigationbar should cover part of my scrollview.
I tried adautomaticallyAdjustsScrollViewInsets
, contentInsetAdjustmentBehavior
, and other similar solutions but nothing seemed to work.
Finally, I noticed if I replace the safe area top constraint
with a superview constraint
I get the expected result but Iām here to ask: is this the way to go? Is it safe? Are there any possibile drawbacks?