ivanvorobei / SPStorkController

Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
https://opensource.ivanvorobei.io
MIT License
2.73k stars 204 forks source link

iOS 14 bug : swiping down the sheet do not pull down the sheet #116

Open blitzvb opened 3 years ago

blitzvb commented 3 years ago

Bug:

When you swipe down the view, it do not pull down gradually the sheet. When you swipe down enough it will close it suddenly. It was working great before and the bug appear only on iOS 14.

Code used :

`

    let transitionDelegate = SPStorkTransitioningDelegate()
    transitionDelegate.storkDelegate = navController
    transitionDelegate.customHeight = viewController.panelHeight
    transitionDelegate.confirmDelegate = navController
    navController.transitioningDelegate = transitionDelegate

    navController.modalPresentationStyle = .custom

    self.topNavigationController().present(navController, animated: true, completion: nil)`
Amondus commented 3 years ago

У меня аналогичная проблема в iOS 14. Будет ли исправление данного бага?

gumenuk39 commented 3 years ago

the same

jhk115 commented 3 years ago

I can confirm this is also happening for me on ios 14. For me, the scroll view itself seems to be "stuck". Scrolling up does not scroll the view anymore.

sevgjan commented 3 years ago

It's also happening to me, you can only see the indicator that it's moving and the opacity behind the screen is being reduced. It just dimissess the view controller if dragged down enough.

jhk115 commented 3 years ago

If you guys have the luxury to target iOS 13, I recommend just rolling with the native modal. It was a painless switch.

ivanvorobei commented 3 years ago

@jhk115 agree

sevgjan commented 3 years ago

@jhk115 I agree, and for most of the part I believe we all do that. But @ivanvorobei has done an amazing job with possibilities for height customization, close button, indicator, etc. which makes us prefer to use this library.

lyimin commented 3 years ago

It's also happening to me only on iOS 14, solved my problem after setting it

        if #available(iOS 11.0, *) {
            tableView.contentInsetAdjustmentBehavior = .never
        } else {
            automaticallyAdjustsScrollViewInsets = false
        }
tibo9 commented 3 years ago

This is happening because SPStorkPresentationController containerViewWillLayoutSubviews is setting the presented view controller's frame to frameOfPresentedViewInContainerView when pan gesture changed.

Rogue85 commented 2 years ago

@ivanvorobei Any updates?

davidleee commented 2 years ago

This is happening because SPStorkPresentationController containerViewWillLayoutSubviews is setting the presented view controller's frame to frameOfPresentedViewInContainerView when pan gesture changed.

Comment out these few lines fixes the problem. @tibo9 Did you find any side effects doing so? Thanks in advance.