Partially solves #281. This adds a new example app which mimics the Maps.app, written in SwiftUI. The code works for iOS 13+, however:
* the project has been created with Xcode 13
* the project uses the SwiftUI lifecycle (iOS 14+)
The source code in Examples/Maps-SwiftUI/Maps/FloatingPanel is ready to move into the library, but there is an issue on SwiftUI’s environment propagation into FloatingPanel. SwiftUI’s environment is propagated to all subviews. However FloatingPanel is not a subview, but a new view controller in the screen (and not a child view controller).
It’s possible to lead behaviors unexpected by SwiftUI users so that this is merged as a sample code until it will be resolved.
* Add UseCaseController
* Add Layouts.swift
* Add PagePanelController
* Append access modifiers into some objects
* Split view controllers into each file
* Organize the project
* Rename currentMenu with currentUseCase
* Rename SampleListVC with MainVC
* Update UseCase enum
* Update DebugTableViewController to test the scroll (un)tracking functions
* Support over 3 states in LayoutAdapter
* Allow to inherite FloatingPanelState
* Support a custome FloatingPanelState in ObjC
* Replace Menu enum with UseCase enum in Samples.app
* Rename UIExtensions to Extensions
* Add CustomState use case in Samples app
* Reset the moveAnimator prop after a move animation
If `moveAnimator` isn't null, `FloatingPanelPanGestureRecognizer.touchesBegan`
detects `began` state quickly so that it doesn’t allow to work a tap gesture or
tap action in a panel.
Resolve#392
* Add 2 buttons in DebugTableViewController
If a library consumer allows a panel projectable movement with the
FloatingPanelBehavior object, the panel is able to invoke the removal
interaction when the next moving position projected the momentum is
hidden.
* Add BottomEdgeInteractionLayout sample
* Support v2
* Use FloatingPanelSurfaceAppearance
* Fix 'Tab Bar > Layout 3' in Samples.app
* Remove interactionBuffer(for:) from Samples.app
* add floatingPanel(_:contentOffsetForPinning:)
* add 'Show NavigationController' sample
* fix the initial content offset in a navigation bar with a large text
The content offset preservation should be applied only when
`FloatingPanelController.contentInsetAdjustmentBehavior` is `.always`.
This is because the library user loses control of the initial offset.
This issue is that a panel moved up while dragging it
down if content offset of the tracking scroll view in
a content view controller was greater than its top interaction buffer.
Ref. #293