FloatingPanel icon indicating copy to clipboard operation
FloatingPanel copied to clipboard

Custom presenting animation

Open Exocomp opened this issue 3 years ago • 1 comments

Hi there, is it possible to add a custom presenting animation. For example, for the presenting animation to be a scale from small to large and also to fade in? I'd appreciate it if you can point me in the right direction. Thanks and have a great day!

Exocomp avatar Dec 06 '21 13:12 Exocomp

Yes, it is. You can set a transition delegate object returning your custom presentation controller to FloatingPanelController.transitionDelegate. The default value is https://github.com/scenee/FloatingPanel/blob/2.5.1/Sources/Transitioning.swift#L5, which handles the default presentation. Therefore you are able to present a panel modally with a custom animation implemented in a custom presentation controller. These code of ModalTransition and PresentationController in Transitioning.swift will help you to implement your custom ones.

scenee avatar Dec 11 '21 02:12 scenee