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

PopView doesn't work for me (Xcode 11.3.1) #10

Closed
aliben opened this issue Mar 5, 2020 · 1 comment
Closed

PopView doesn't work for me (Xcode 11.3.1) #10

aliben opened this issue Mar 5, 2020 · 1 comment

Comments

@aliben
Copy link

aliben commented Mar 5, 2020

Hello,
I've been trying your awesome navigation stack and it's been great to push the views, but I couldn't manage to make to PopView work ( it doesn't send me to the previous view even when I set an Id ) I honestly don't know what am doing wrong.

ParentView where I use the PushView ( works fine )
ScrollView(.horizontal, showsIndicators: false) { HStack (spacing: 16){ ForEach(productData){ item in PushView(destination: ProductDetails()){ SingleProduct(showCount: false, count: 01, countnull: false, singleProduct: item) } } }.frame(height: 320) .padding(.top,20) .padding(.horizontal) } .offset( y: -15)
`

ChildView ( Doesn't work )

HStack{ PopView(isActive: $isActive){ Button(action: { self.isActive.toggle() }){ Image(systemName: "arrow.left") .font(.system(size: 24, weight:.regular, design: .default)) .foregroundColor(Color.black) .frame(width:45,height: 45) .background(Color.white) .cornerRadius(13) .shadow(color: Color.black.opacity(0.1), radius: 10, x: 0, y: 12) } } } .padding(.horizontal,16)

@aliben aliben closed this as completed Mar 5, 2020
@aliben
Copy link
Author

aliben commented Mar 5, 2020

Never mind it was just a stupid mistake from my part I've put the PopView inside a NavigationStackView that's why it didn't work. Thank you so much for the great work.

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

1 participant