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

bug: card animation #8

Open
dudutwizer opened this issue Jun 15, 2020 · 1 comment
Open

bug: card animation #8

dudutwizer opened this issue Jun 15, 2020 · 1 comment

Comments

@dudutwizer
Copy link

dudutwizer commented Jun 15, 2020

Hi,

Thank you for developing this..

I manage to get it work but the card animation is somehow unstable:

Main issues:

  1. When I slide the card to the .middle , the animation start again and it looks like it have a bug
  2. Same thing if I push it up to the .top
  3. On iPhone 10 it stuck on the .top and you it doesn't recognize the 'pulling down'

here is how I implement it:

struct Main: View {
.. bla bla..
@State private var position = CardPosition.bottom
@State private var background = BackgroundStyle.blur
.. bla bla..
var body: some View {
            NavigationView {
                   ZStack(alignment: Alignment.top) {
                          .. some code..
                   VStack {
                       ...... some code...
                      } //end of VStack


            SlideOverCard(self.$position, backgroundStyle: $background) {
                    VStack {
                        Image("open-menu")
                        .resizable()
                        .scaledToFit()
                        .frame(width: 50, height: 50)
                        .foregroundColor(Color.white)
                        .padding(.bottom, 10)
                        
                        VStack(alignment: .leading)
                        {
                           .. buttons...
                        }
} // end of VStack
} // end of SlideOverCard
} // end of ZStack
.edgesIgnoringSafeArea(.vertical)
} // end of NavigationView
} // end of View
} // end of main view

thank you in advance!!

@moifort
Copy link
Owner

moifort commented Sep 28, 2020

Sorry for the late answer I wasn't notified, I will take a look!

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