How not to draw a view outside safeArea?

Viewed 16

I've made a Dropdown View, that should slide under navigation bar and most part of it should not be visible until it drops down again. here how it works

But the problem is that the view is visible under navigation bar. Here is what I've tried: Setting bg color of navigation bar to some opaque color. It worked, but view outside safe area and navigation bar stays transparent you can see it here

Creating a content view, pinned to the view according to safeAreaLayoutGuide, adding this content view as a subview to my VC's view. It worked just as I would wanted to, but is there another way to make the zone outside safeArea opaque without creating content views and stuff like that? Please give me your ideas. I'll add details if needed

0 Answers
Related