FloatingPanel

A clean and easy-to-use floating panel UI component for iOS

MIT License

Stars
5.6K
Committers
46

Bot releases are hidden (Show)

FloatingPanel - 2.4.1

Published by scenee about 3 years ago

This release has a bug fixe and a improvement. This release is also checked on Xcode 13.

Improvement

  • Fix objc can not obtain dismissalTapGestureRecognizer (#496)

Bugfixes

  • Keep the panel's pan gesture disabled (#485, #486)

Thank you to @AustinConlon and @codingiran for this release!

FloatingPanel - 2.4.0

Published by scenee over 3 years ago

This release has a bug fixe and some improvements. It doesn't have any major behavior updates, but some API changes. So please check the following API changes because you might some changes in your code.

API Changes

  • floatingPanelDidChangePosition is now floatingPanelDidChangeState.
  • Added a completion handler in addPanel(toParent:) (#402)

Improvement

  • Revised LayoutAdapter implementation
  • Updated README for the backdrop tap-to-dismiss action

Bugfixes

  • Fixed a regression for the backdrop behavior (#466)

Thank you to @ziv-mishloha and @sipersso for this release!

FloatingPanel - 2.3.1

Published by scenee over 3 years ago

This release has a bug fixe and some improvements including refactoring code.

Improvements

  • Improve the function rounding a dimension by a display scale
  • Clean up Extensions.swift
  • Refactor code of the samples app

Bugfixes

  • Fix the backdrop flickering (#449)
FloatingPanel - 2.3.0

Published by scenee over 3 years ago

This release has an enhancement and bugfixes including a critical issue. This is highly recommended to upgrade.

Improvements

  • Enable to add custom panel states (#438)

Bugfixes

  • Fix workaround to precent bouncing a scroll content in a content view
  • Prevent the potential memory leaks in the modal transition (#429)
  • Remove class keyword
  • Prevent a memory leak in a nested function (#441)

Thank you to @i-arun-samui and @mschonvogel for this release!

FloatingPanel - 2.2.0

Published by scenee over 3 years ago

This release introduces 2 new APIs and has some improvements and bugfixes for crashes. This is highly recommended to upgrade.

New features

  • Add cornerCurve option to SurfaceAppearance (#417) via @zntfdr
  • Add optional removalInteractionVelocityThreshold value to Behavior (#425) via @Argent

Improvements

  • Add a description for the backdropAlpha(for:) API (#416)
  • Address the grabber area detection in scroll tracking (#407)
  • Stop moving a panel while the tracking table view is editing (#431)
  • Revise the swizzling prop to make it nonnull
  • Move the main ci to github actions (#437)

Bugfixes

  • Fix example typo (#418) via @zntfdr
  • Fix swiftformat (#426) via @funzin
  • Fix a crash by the move animator (#423)
  • Fix an issue where not dragging a panel by priority of Layout.interactionConstraint (#428)
  • Fixed the crash when ownerVC is nil. (#436) via @nickcheng

Thank you to @zntfdr, @Argent, @warpling, @jnwagstaff, @WrathChaos, @mazvydasb, @funzin, @mschonvogel, @Distance-MJ and @nickcheng for this release!

FloatingPanel - 2.1.0

Published by scenee almost 4 years ago

v2.1.0 introduces some new features. I welcome your feedback!

New features

  • FloatingPanelAdaptiveLayoutAnchor
    • This new anchor layouts a panel respecting the content size represented by an UILayoutGuide object.
    • This is a great potential up to you. See 'Show Adaptive Panel' example in the Samples app.
  • Add the default behavior for the escape action of Accessibility.

Improvements

  • Open FloatingPanelDefaultBehavior class to allow to inherit it.

Bugfixes

  • Update readme url for Transitioning.swift (#398)

Thank you to @warpling, @takaoh717, @groue and @kevinrenskers for this release!

FloatingPanel - 2.0.1

Published by scenee almost 4 years ago

This version includes some major bug fixes so it is recommended to upgrade from 2.0.0.

Bug fixes

  • Add missing commas in migration guide #387 by @zntfdr
  • Ease the default velocity for a panel removal #395
  • Reset the moveAnimator prop after a move animation #396

Thanks you to @zntfdr, @aclassen, @sipersso and @mstana for this release!

FloatingPanel - 2.0.0

Published by scenee about 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
FloatingPanel - 1.7.6

Published by scenee about 4 years ago

This is the last release of v1. This includes some bug fixes and the removal interaction update.

Behavior change

  • Enable the removal interaction at any positions upon the conditions (#335)

Bug fixes

  • Fix quick pull down (#385)
  • Use 'prominent' blur effect in Maps sample (#379)
  • Small typo fixes (#378)
  • Update README.md sample code (#371, #367)

Thank you to @lekom, @knchst, @jstart, @ghazel and @michalraska for this release!

FloatingPanel - 1.7.5

Published by scenee over 4 years ago

v1.7.5 has a bunch of bug fixes. There is no update to change the behavior and specs. So it's recommended to upgrade from v1.7.x

Bug fixes

  • Fix a build error on Xcode 11.4 (#337)
  • Support the initial hidden position not including the supported positions (#344, #345)
  • Fix an invalid indicator insets of the tracking scroll view (#346)
  • Fix the memory leak of FloatingPanelController object (#347, #350)
  • Avoid the invalid safe area insets in a table view with static cells (#330, #353)
  • Fix the animation velocity's sign (#354)
  • Fix {top,bottom} constant's boundary in updating panel interactively (#349, #352)
  • Fix the panel behavior in a sheet modal (#358)
  • Fix the constraints break on fitToBounds mode (#359)

Thank you to @Isuru-Nanayakkara, @alexander-lsvk, @mhdhejazi, @kohei1218, @chriskilpin, @FlashTang and @GrigoryUlanov for this release!

FloatingPanel - 1.7.4

Published by scenee over 4 years ago

This release has a hotfix for v1.7.3 as follows.
(v1.7.3 has already been removed v1.7.3 from GitHub and CocoaPods. )

Improvements

  • Ignore .swiftpm/ folde by @zntfdr

Bugfixes

  • Fix floatingPanel(_:contentOffsetForPinning:) delegate name

Thank you so much to @zntfdr.


1.7.3

This release includes a new delegate method and bug fixes. It is highly recommended to upgrade if you use v1.7.2 or display multiple panels overlapping.

New APIs

  • Add floatingPanel(_:contentOffsetForPinning:) delegate method (#314)
func floatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning trackedScrollView: UIScrollView) -> CGPoint

Bug fixes

  • Fix an issue where the pan gesture recognizer doesn't work well when multiple panels are displayed #308, #320.
  • Fix a breaking content offset of the tracked scroll view #293
  • Minor README.md typo #316
  • Fix a run script error #319

Thank you to @fedorpashin, @kohei1218, @lucio1392, @jacksonjude and @richardgroves for this release!

FloatingPanel - 1.7.2

Published by scenee over 4 years ago

This release includes a new API and many bug fixes. As usual this is recommended to upgrade. Thank you.

New API

  • Add FloatingPanelController.nearbyPosition by @ramrcram #303

Improvements

  • Return the child view controller to consult #311

Bugfixes

  • Fix Maps.app's crash on device after the second launch
  • Fix a panel's move-up in dragging it down
  • Fix grabber area behavior
  • Fix not calling floatingPanelDidEndDecelerating when an decelerating animation interrupted
  • Make floatingPanelDidEndDragging's velocity zero when it won't be decelerated.

Thank you to @ramrcram and @lucio1392 for this release!

FloatingPanel - 1.7.1

Published by scenee almost 5 years ago

I'm proud to announce the release of FloatingPanel 1.7.1. Some great improvements has been made. I recommend to upgrade to this version. Thank you.

Improvements

  • Enable the swift module interfaces #287
    • If you build a framework from the source code on Xcode 11 or later, it has the module stability in Swift.
  • Improve the surface position evaluation and top scroll bouncing of content by @dmytrofrolov1 #272
  • Polish README by @peka2, @TadeasKriz

Bugfixes

  • Fix addPanel(toParent:) #290

Thank you to @dmytrofrolov1, @peka2 and @TadeasKriz for this release!

FloatingPanel - v1.7.0: Add new and enhanced APIs

Published by scenee about 5 years ago

This release includes the new APIs to enhance the use cases. ✨ 🎉 ✨

And now FloatingPanel.podspec uses swift_versions! So CocoaPods v1.7.0 or later is required for the installation.

I would like to continue to enhance this UI component with you. Welcome to your report and PR.

New APIs

FloatingPanelController

var contentMode: FloatingPanelController.ContentMode
changes.
    public enum ContentMode: Int {
        case `static`
        case fitToBounds
    }

This allows to change the surface height as following a user interaction and fix the bottom of a panel. For example, you can display a fixed footer view upon Auto Layout constraints.

See also Show Detail Panel sample in Samples.app.

✏️ In .fitToBounds mode, you have a responsibility to configure Auto Layout constrains not to break the layout of a content view by the elastic surface height.

FloatingPanelSurfaceView

var containerMargins: UIEdgeInsets

This allows to modify the surface container margins. For example, the following use cases.

  • Facebook/Slack-like panel whose surface top edge is separated from the grabber handle.
  • iOS native panel to display AirPods information.

See also showContainerMargins sample in Samples.app.

FloatingPanelBackdropView

var dismissalTapGestureRecognizer: UITapGestureRecognizer!

This allows to disable tap on backdrop view for panel dismissal. by @nderkach

FloatingPanelLayout

var positionReference: FloatingPanelLayoutReference
public enum FloatingPanelLayoutReference: Int {
    case fromSafeArea = 0
    case fromSuperview = 1
}

This allows to change the referred bounds used to calculate each position from FloatingPanelLayout.insetFor(_:)

Improvements

  • Add fitToBounds content mode
  • Add support for CocoaPods version 1.7 swift_version by @joshuafinch
  • Add 2 samples, showPageContentView and showContainerMargins in Samples.app
  • Add test cases for new features

Bufixes

  • Call floatingPanelDidEndRemove when dismiss with tap on backdrop view by @rikusouda

Thank you to @joshuafinch @nderkach and @rikusouda for this release!

FloatingPanel - v1.6.6

Published by scenee about 5 years ago

It includes some maintenance updates. It is the last release in 1.6.x.

Improvements

  • Clean up code
  • Support Xcode 11 and Swift 5.1

Bugfixes

  • Fix iOS 13 issues
FloatingPanel - v1.6.5

Published by scenee about 5 years ago

Improvements

  • Return true for FloatingPanelSurfaceView.requiresConstraintBasedLayout
  • Update README for UISearchController issue #248
  • Add move-to-hidden tests
  • Don't unregister safeAreaInsetsObservation in hide()
  • Improve floatingPanelDidChangePosition and tigger it on removal by David Hart
  • Support bottom content inset for container view (#257) by @nderkach

Bugfixes

  • Samples App: Fix UISearchBar's _searchField access #243

Thank you to David Hart, @nderkach, @swiftymf and @roblabs for this release!

FloatingPanel - v1.6.4

Published by scenee about 5 years ago

This release contains some bugfixes for the animation interruption.

Bugfixes

  • Fix not calling floatingPanelDidEndDecelerating delegate after interruption
  • Always call startInteraction before endInteraction to keep the delegate call convention.
  • Fix stopping a panel b/w anchors after an interruption
FloatingPanel - v1.6.3: Revamp the core logic

Published by scenee about 5 years ago

This has a bunch of bugfixes and improvements. It's more stable than the earlier versions.

The core logic was refactored along with many new unit tests and then the position handling, scroll lock and animation interruption become robust. I highly recommend to upgrade to the version.

This is a big milestone to go to the next step, which is the initial version supporting the elastic height and top-to-bottom layout.

Improvements

  • Add unit tests for the layout and the animation logic.
  • Refactor the core logic for the next features.
  • Revise the doc comments.

Bugfixes

  • Fix the .hidden position handling. Now you can use .hidden position as well as other positions.
  • Fix the scroll lock and unlock when an animation interrupted.
  • Fix a bug of the removal interaction.
  • Fix the behavior when the animation is interrupted over the top most position.
  • Fix an ambiguous layout error after swiping down from full to half position.
  • Stop the top edge bounce when a tracking scroll is decelerating using an interruptible animator.
  • Fix the SafeArea update
  • Fix scroll lock just before/after dragging down in the grabber area
FloatingPanel - v1.6.2

Published by scenee about 5 years ago

Bugfixes

  • Fix the scroll indicator lock on a contentVC reset
  • Refactor FloatingPanel and FloatingPanelLayoutAdapter a bit by the new unit tests.
  • Prevent potential 'unexpectedly found nil' fatal error
FloatingPanel - v1.6.1: Support SwiftPM on Xcode11!

Published by scenee over 5 years ago

Improvements

  • Add Swift Package Manager support by @robbiet480

Bugfixes

  • Fix the crash while closeing via dragging #216
  • Fix closing panel during internal scroll view bounce #218
  • Remove workaround for tableView(_:didSelectRowAt:) issue #225
  • Fix an unexpected layout update in the background on iOS13 #228

Thank you to @robbiet480 for your SwiftPM support!
Thank you to @cozzin, @Heltisace and @Isuru-Nanayakkara for your issues and cooperations!

Package Rankings
Top 0.57% on Cocoapods.org
Top 6.41% on Carthage
Top 4.15% on Proxy.golang.org
Top 6.31% on Swiftpackageindex.com
Badges
Extracted from project README
Swift 5 Platform Version