slackhq / PanModal

An elegant and highly customizable presentation API for constructing bottom sheet modals on iOS.
MIT License
3.68k stars 531 forks source link

Not Animated transition from .long to .short #189

Open alikenski opened 2 years ago

alikenski commented 2 years ago

Description

The height of .longForm is ~570 and .shortForm height is ~450. And when I call

panModalSetNeedsLayoutUpdate()
 panModalTransition(to: state)

code animation is sharp and fast (without transition, not smooth)

What type of issue is this? (place an x in one of the [ ])

Requirements (place an x in each of the [ ])


PanModal version: 1.2.7

iOS version: 14.3 (Simulator)

kaitoshadow commented 1 year ago

Do you have any solution?

alikenski commented 1 year ago

@kaitoshadow Yes bro, you should add parameter to protocol extension

extension ViewController: PanModalPresentable {
    ....
    var anchorModalToLongForm: Bool {
        false
    }
    ....
}