PageView icon indicating copy to clipboard operation
PageView copied to clipboard

Constraining HPageView width to its child view

Open transat opened this issue 3 years ago • 1 comments

In the following scenario I can see all three pages (ImageView) at once and the pages even slide behind "MyLabel". Is there a way to stop that from happening?

HStack{
    Text("MyLabel: ")
    HPageView(selectedPage: $pageIndex) {
        Image1View()
        Image2View()
        Image3View()
    }
}

transat avatar Mar 22 '21 04:03 transat

Hi, sorry for delay. In this case, adding .clipped() modifier to PageView should solve this.

fredyshox avatar Jul 14 '21 13:07 fredyshox