How to add shadow for PageTabViewStyle on SwiftUI?

Viewed 505

I use a TabView which I added a paginated view for it like this:

.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))

as you see in the bottom picture, the paginate color is like my background color & I want to add a shadow to it so it pops out a little bit more.

So how do I achieve this?

enter image description here

1 Answers

You can add a background behind the dots using indexViewStyle:

.indexViewStyle(PageIndexViewStyle(backgroundDisplayMode: .always))
Related