Reputation: 1
I have a return button that is inside a view on the top left corner, and that view is anchored to the top of the safe area.
What I'm trying to set is the button's top and leading constraint to the top and the leading of the safe area, but since the button is inside a view I guess the safe area is not visible to it?
So what can I do to set the top constraint of the button to the top of the safe area rather than the superview that the button is inside? fix the button issue without taking the button outside of the view and make it overlap with the view and sitting its z-index above it.
the arrow-shaped button on the top-left corner, and the view colored with navy blue.
Upvotes: -1
Views: 704
Reputation: 100541
From your images it seems like that you don't set the top constraint of the top view to top safeAreaLayoutGuide
instead you set it to superView here
, also you can't set the top of the button to safeArea , as it's only appears for direct subviews of thw main vc's view not to nested subviews
Upvotes: 0