v1.2.0
I've released v1.2.0!! This release has many improvements and bugfixes. As a result, the floating panel is more robust and fluid. I highly recommend to update it from the previous version.
It's all thank to you reports and contributions.
I would like to continue to enhance this UI component with you. Welcome to your report and PR.
New APIs
- Add a removal interaction invoked when a floating pane is at the bottom position. Ref #8
- Update the layout programmatically. Ref #39
- Enable to customize the redirectional behavior.
FloatingPanelController
isRemovalInteractionEnabled
: Enable the removal interaction(swipe down)updateLayout()
: Update the layout object from the delegate and apply it to the views. It might be useful in an animation.
FloatingPanelControllerDelegate
floatingPanelDidEndDraggingToRemove(_:withVelocity)
floatingPanelDidEndRemove(_:)
FloatingPanelBehavior
removalVelocity
,removalProgress
,removalInteractionAnimator(_:with)
: Customize the removal interactionredirectionalProgress(_:from:to:) -> CGFloat
: Customize the redirectional max progress.
Modified APIs
FloatingPanelController
- show(contentVC, sender: nil)
+ set(contentViewController: contentVC)
If you use v1.1.0, a build will be broken, but it's easy to fix it.
See #21 for the reason of this change.
Improvements
- Now FloatingPanelController allows to display a floating panel on only 1 supported position.
- Improve scroll view handling to make it robust and more consistent between scrolling a scroll view and dragging a floating panel.
- Enable to drag the panel using the grab handler regardless of the scrolling position. Thanks, @ffittschen!
- Improved shadow, not darkening content background. Thanks, @futuretap.
Bugfixes
- Add missing constraint of the title in Stocks app Thanks, @kingcos!
- Fix the surface view's background color is not updated when a value is set to FloatingPanelSurfaceView.backgroundColor. Ref #22
- Fix a blackout of the backdrop when tip and half supported positions. Ref #27
- Fix issues on a large title or translucent of UINavigationBar Ref #26, #28
- Fix scrollview jumps after it moved programmatically Ref #35
- Fix infinite recursion in FloatingPanel.responds(to:)
Misc
- Update preconditions of the parent VC
- Update Samples App to test issues.