You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works fine with using finger to drag overlay, but when I slide up the overlay quickly or call containerVC.moveOverlay(toNotchAt: 2, animated: true), it's jump a little bit.
I checked the code and found that delegate didn't call this method overlayContainerViewController(_ containerViewController: OverlayContainerViewController, willTranslateOverlay overlayViewController: UIViewController, transitionCoordinator: OverlayContainerTransitionCoordinator) continuously
I've attached a video.
Record.mov
The text was updated successfully, but these errors were encountered:
The transitions can be animated. In that case, the delegate method will be called only once when the transition starts. You can detect them using the OverlayContainerTransitionCoordinatorContext.isAnimated property.
I would move your logic to the animate block and use the context.targetTranslationHeight property to know where the container will be instead of the current overlay position:
func overlayContainerViewController(_ containerViewController: OverlayContainerViewController, willTranslateOverlay overlayViewController: UIViewController, transitionCoordinator: OverlayContainerTransitionCoordinator) {
transitionCoordinator.animate(alongsideTransition: { (context) in
let offset = ... // based on `context.targetTranslationHeight`
self.topContainerTopConstraint.constant = -offset
if context.isAnimated {
self.view.layoutIfNeeded() // to animate the layout update
}
}, completion: nil)
}
Hi there!
I'm trying to make interaction with other views in sync with the overlay transition and maybe is same issue with #42
Here is my implementation, I put detect point code in
It works fine with using finger to drag overlay, but when I slide up the overlay quickly or call
containerVC.moveOverlay(toNotchAt: 2, animated: true)
, it's jump a little bit.I checked the code and found that delegate didn't call this method
overlayContainerViewController(_ containerViewController: OverlayContainerViewController, willTranslateOverlay overlayViewController: UIViewController, transitionCoordinator: OverlayContainerTransitionCoordinator)
continuouslyI've attached a video.
Record.mov
The text was updated successfully, but these errors were encountered: