github scenee/FloatingPanel 2.0.0

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

FloatingPanel 2.0 is the latest major release of FloatingPanel. As a major release, following Semantic Versioning conventions, 2.0 introduces API-breaking changes.

The migration guide is provided in order to ease the transition of existing applications using FloatingPanel 1.x to the latest APIs, as well as explain the design and structure of new and updated functionality.

Thank you for all users and contributors of this library. This version has been completed with your contributions and feedback. I continue to welcome your feedback.

Environment updates

  • Swift 5.0 or later
  • iOS 11 or later(iOS 10 might be working)
  • Update the directory structure and file names

Feature updates

  • Support top, left and right positions of the panel
  • Add ObjC compatibility
  • Improve the layout customization
  • Improve the behavior customization to handle it like UIScrollView
  • Improve the remove interaction
  • Fix many issues depending on API design

API updates

  • FloatingPanelController
    • Replace surfaceOriginY with surfaceLocation
    • Enable to update layout and behavior directly
    • Update scroll tracking API a bit to support multiple scroll view tracking in the future.
  • FloatingPanelControllerDelegate
    • Change floatingPanel(_:didMove:) behavior which is also called in the spring animation.
    • Update removal interaction delegate
      • Enable a panel to invoke the removal action at any state(position)
      • Add 
floatingPanel(_:shouldRemoveAt:with:) to determine whether it invokes the removal interaction.
    • Add floatingPanelDidEndDragging(_ vc:willAttract:)
  • FloatingPanelLayout
    • Introduce FloatingPanelLayoutAnchoring for the more flexible layout.
      • Add a factional panel position in the FloatingPanelController view
      • Replace FloatingPanelFullScreenLayout and FloatingPanelIntrinsicLayout
  • FloatingPanelBehavior
    • Introduce the new spring effect using Numeric springing
    • Add properties to contorl numeric springing
    • Remove .topInteractionBuffer/.bottomInteractionBuffer
      • You can control the panel max/min position in floatingPanel(_:didMove:) delegate method
  • SurfaceView
    • UseSurfaceAppearnace to specify the rounding corners, shadow and background color.
  • FloatingPanelPanGestureRecognizer
    • Add delegateProxy to intercept the gesture recognizer delegate.
  • Improve API naming
    • FloatingPanelPosition is now FloatingPanelState
      • Now FloatingPanelPosition is used to specify the panel positioning in a screen.
    • FloatingPanelGrabberHandleView is now GrabberView (Swift only)
    • FloatingPanelSurfaceView is now SurfaceView (Swift only)
    • FloatingPanelBackdropView is now BackdropView (Swift only)
    • "decelerate" term is replaced with "attract" because the spring behavior is actually magnetic
  • Misc
    • Add UISpringTimingParameters(decelerationRate:frequencyResponse:initialVelocity:)

Behavior updates

  • Layout
    • FloatingPanel doesn't disable constraints to Safe area in a content view so that the behavior of a content view always respects Safe area which is global in a screen. If it's not clear, please try Samples.app > Detail Panel and swipe it up to full state.
  • BackdropView
    • Disable the dismissal action of backdrop by default
      • You can enable it to set fpc.backdropView.dismissalTapGestureRecognizer.isEnabled = true

Don't miss a new FloatingPanel release

NewReleases is sending notifications on new releases.