Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constraining HPageView width to its child view #16

Open
interior-night opened this issue Mar 22, 2021 · 1 comment
Open

Constraining HPageView width to its child view #16

interior-night opened this issue Mar 22, 2021 · 1 comment

Comments

@interior-night
Copy link

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()
    }
}
@fredyshox
Copy link
Owner

fredyshox commented Jul 14, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants