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

Weird blinking when trying to pull bottom sheet #40

Closed
ValeriyJefimov opened this issue Dec 29, 2021 · 6 comments · Fixed by #42
Closed

Weird blinking when trying to pull bottom sheet #40

ValeriyJefimov opened this issue Dec 29, 2021 · 6 comments · Fixed by #42
Labels
bug Something isn't working Thank You ❤️ For people who appreciate my work

Comments

@ValeriyJefimov
Copy link

ValeriyJefimov commented Dec 29, 2021

Hey, Lucas. Thanx for such an awesome lib)

Had an issue after latest update when trying to pull down content. Code sample attached

...
    .bottomSheet(
        bottomSheetPosition: $position),
        options: [
            .appleScrollBehavior,
            .swipeToDismiss,
            .noBottomPosition,
            .dragIndicatorColor(.surface),
            .background(AnyView(Color.clear))
        ]) {
            BottomView(...)
        }
...

Also video sample attached
https://user-images.githubusercontent.com/19861161/147619151-88d482ef-e8de-48f9-97b2-5e52faf0b6fc.mov

Thanx a lot)

@lucaszischka lucaszischka added bug Something isn't working Thank You ❤️ For people who appreciate my work labels Dec 29, 2021
@lucaszischka
Copy link
Owner

Thank you for your repot. Was this issue already present in the last version? I don’t think so, but I just want to be sure. I have an idea, what the problem could be and I will look deeper into it tomorrow.

@ValeriyJefimov
Copy link
Author

Thanx for your reply.
That issue was faced in 2.5.0)

@lucaszischka
Copy link
Owner

Hello, could you please confirm that the #test branch fixes your issue. After a lot of testing I can not reproduce it anymore with the test branch.

@lucaszischka lucaszischka linked a pull request Jan 5, 2022 that will close this issue
@ValeriyJefimov
Copy link
Author

@LucasMucGH unfortunately cannot confirm. Try to pull down with low acceleration.

Sample code

 Rectangle()
                        .foregroundColor(.red)
                        .bottomSheet(
                    bottomSheetPosition: $position,
                    options: [
                        .appleScrollBehavior,
                        .noBottomPosition,
                    ]) {
                        Rectangle()
                            .foregroundColor(.blue)
                            .frame(height: 300)
                            .padding([.trailing, .leading], 20)
                    }

@lucaszischka
Copy link
Owner

I tested your sample code. This are the results of my real device:

RPReplay_Final1641656923.mov

There is indeed a small view glitch, but it only appears once when pulling the BottomSheet really slow down.
But because I don't know any other possibility for to implement this feature and it is now way better than before, I will see this issue as solved. The only other possibility is to remove this feature altogether, because it can't be implemented perfectly due to the problems with DragGesture on ScrollViews. Maybe I will find a workaround or something in the future.

I hope we can agree, that the issue can be seen as fixed now.

lucaszischka added a commit that referenced this issue Jan 8, 2022
- Fix critical bug with `.appleScrollBehavior` (closes #40)
- Update codestyle
- Remove not used file
- Update Readme
@ValeriyJefimov
Copy link
Author

Thanx a lot)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Thank You ❤️ For people who appreciate my work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants