github scenee/FloatingPanel v1.4.0

latest releases: 2.8.6, 2.8.5, 2.8.4...
5 years ago

This release includes some new features and improvements to enhance the panel interaction ✨ 🎉 ✨

Now you can..

  • Change a panel's width with AutoLayout in moving it(See Samples.app -> Show Tab Bar -> Tab 3). Because a panel frame is always changed using Auto Layout. It will be able to let you configure more flexible layout of a moving panel with FloatingPanelLayout improvement in the future.
  • Stop beginning a panel dragging by floatingPanelShouldBeginDragging delegate method
  • Jump over a half position by interaction(i.e. from tip to full and vise versa) using FloatingPanelBehavior.shouldProjectMomentum(_:for:)
  • Configure a panel layout using FloatingPanelFullScreenLayout without bothering about SafeArea stuffs.

New Features

FloatingPanelControllerDelegate

Add floatingPanelShouldBeginDragging(_:). You can stop to begin dragging on the conditions. It's useful to handle other pan gestures or touches simultaneously with a floating panel.

+ public func floatingPanelShouldBeginDragging(_:)

FloatingPanelBehavior

Add 2 methods to configure the momentum projection

+ func shouldProjectMomentum(_ fpc: FloatingPanelController, for proposedTargetPosition: FloatingPanelPosition) -> Bool`
+ func momentumProjectionRate(_ fpc: FloatingPanelController) -> CGFloat

FloatingPanelFullScreenLayout

You can configure all insets of the surface from the superview(FloatingPanelController.view), not from the safe area.

Improvements

FloatingPanelController

Enable to cancel the scroll view tracking

- public func track(scrollView: UIScrollView) {
+ public func track(scrollView: UIScrollView?) {

Core

  • Move the surface view by a top layout constraint, not by modifying the frame directly.
  • Normalize the projected position
  • Modify disabling the bottom constraint on top overflow.
  • Revamp Scroll draw-down interaction by a tracking scroll view. It becomes more smooth

Layout/Behavior

  • Open the default layout/behavior

Samples

  • Add a sample of the advanced layout animation

Bugfixes

  • Fix #133: FloatingPanel can be dragged outside safe area (with new logic)

Don't miss a new FloatingPanel release

NewReleases is sending notifications on new releases.