Shin Yamamoto
c962395581
Fix LayoutAdapter.setUpAnimationEdgeConstraint(to:)
2020-07-11 09:48:25 +09:00
Shin Yamamoto
015454238a
Use LayoutAdapter.positon in itself
2020-07-11 09:48:25 +09:00
Shin Yamamoto
a5341f37c6
Fix a surface container constraint on left position
2020-07-11 09:48:25 +09:00
Shin Yamamoto
c519404752
Fix LayoutAdapter.position(for:)
2020-07-11 09:48:25 +09:00
Shin Yamamoto
4c9ebbbd61
Fix containerOverflow
2020-07-11 09:48:25 +09:00
Shin Yamamoto
0d958b2d04
Rename edgeY to edgePosition
2020-07-11 09:48:25 +09:00
Shin Yamamoto
ab7b16e789
Fix the timing to call floatingPanelDidMove delegate
2020-07-11 09:48:25 +09:00
Shin Yamamoto
c482da8ceb
Rename 'stateAnchors' to 'anchors'
2020-07-11 09:48:25 +09:00
Shin Yamamoto
b348684ed5
Rename 'anchorPosition' to 'position'
2020-07-11 09:48:25 +09:00
Shin Yamamoto
6d63ccd754
Fix the rounding corners of the grabber handle
2020-07-11 09:48:25 +09:00
Shin Yamamoto
579bcbd9dd
Calculate the actual frame duration in numeric springing
2020-07-11 09:48:25 +09:00
Shin Yamamoto
bcba7c8844
Improve delegate methods for the removal interaction
2020-07-11 09:48:25 +09:00
Shin Yamamoto
0adb374146
Prevent potential errors of unsatisfiable constraints
2020-07-11 09:48:25 +09:00
Shin Yamamoto
74d7cdfb42
Fix unsatisfiable constraints on fitToBounds mode
2020-07-11 09:48:25 +09:00
Shin Yamamoto
3de61d5ee2
Reset maskedCorners
2020-07-11 09:48:25 +09:00
Shin Yamamoto
ba1b6170eb
Add FloatingPanelController.untrack(scrollView:) for multiple scroll views' tracking
2020-07-11 09:48:25 +09:00
Shin Yamamoto
1f4daa04c2
Fix hidden state handling with 1 state anchor
2020-07-11 09:48:25 +09:00
Shin Yamamoto
5cebed07d8
Use multi string literal for long log prints
2020-07-11 09:48:25 +09:00
Shin Yamamoto
9b33687c10
Modify FloatingPanelPanGestureRecognizer name
2020-07-11 09:48:25 +09:00
Shin Yamamoto
da4162b307
Fix failure requirements of the pan gesture in the grabber area
2020-07-11 09:48:25 +09:00
Shin Yamamoto
92ca4909ce
Intercept delegate methods of the pan gesture recognizer
...
This replaces floatingPanel(_:shouldRecognizeSimultaneouslyWith)
delegate method.
2020-07-11 09:48:25 +09:00
Shin Yamamoto
65d03846a1
Clean up code
2020-07-11 09:48:25 +09:00
Shin Yamamoto
fe86659db7
Refactor updateStaticConstraint()
2020-07-11 09:48:25 +09:00
Shin Yamamoto
153bd32cfe
Rename fpc.scrollView to fpc.trackingScrollView
2020-07-11 09:48:25 +09:00
Shin Yamamoto
99fd41c58b
Suppress the shadow fade-out animation when the surface jumps to a location.
2020-07-11 09:48:25 +09:00
Shin Yamamoto
d217c3ad2b
Rename heightConstraint to staticConstraint
2020-07-11 09:48:25 +09:00
Shin Yamamoto
0f678d20fe
Support multiple shadows in the surface appearance
2020-07-11 09:48:25 +09:00
Shin Yamamoto
102c9b3019
Fix the height break after rotating a device twice in static mode
2020-07-11 09:48:25 +09:00
Shin Yamamoto
fd4e6fea61
Add UISpringTimingParameters(decelerationRate:frequencyResponse:initialVelocity:)
2020-07-11 09:48:25 +09:00
Shin Yamamoto
54570ac7c6
Fix updating the container height when the content mode is changed
...
This change is necessary to fix a layout break when the contentMode is
changed after laying out a floating panel.
For example, the following patch lets the bug reproduce in Maps.app.
```
diff --git a/Examples/Maps/Maps/ViewController.swift b/Examples/Maps/Maps/ViewController.swift
index c5f25f1..b71c313 100644
--- a/Examples/Maps/Maps/ViewController.swift
+++ b/Examples/Maps/Maps/ViewController.swift
@@ -14,7 +14,6 @@ class ViewController: UIViewController, MKMapViewDelegate {
override func viewDidLoad() {
super.viewDidLoad()
- fpc.contentMode = .fitToBounds
fpc.delegate = fpcDelegate
// Set a content view controller
@@ -33,6 +32,7 @@ class ViewController: UIViewController, MKMapViewDelegate {
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
+ fpc.contentMode = .fitToBounds
// Must be here
searchVC.searchBar.delegate = self
```
2020-07-11 09:48:25 +09:00
Shin Yamamoto
38359e25ad
v2.0
...
* Core
* Support bottom/left/right positioned panel.
* Replace FloatingPanelPosition with FloatingPanelState
* Redefine FloatingPanelPosition
* Fix pan interaction of the intrinsic layout
* Allow to modify a target position
* Fix floating point problem
* Use UIScrollView.adjustedContentInset by default
* Add shouldDecelerate(to:)
* Rename contentOrigin to contentOffsetForPinning
* Improve initialLocation
* Introduce numeric springing
* Support moving a panel with numeric springing
* Update FloatingPanelBehavior
* Remove {top,Bottom}InteractionBuffer from FloatingPanelLayout
* Remove the move animator to be same as UIScrollView behavior
* Add floatingPanelDidMove(_:) tests in calling move(to:animated:)
* Update FloatingPanelControllerDelegate
* Move {add,remove}PanelAnimator delegation
* Add FloatingPanelBehaviorAdapter
* Modify access to `behavior` prop
* Update FloatingPanelLayout
* Support bottom/left/right positioned panel.
* Add anchoredPosition property
* Introduce FloatingLayoutAnchor & FloatingPanelIntrinsicLayoutAnchor
* Add FloatingPanelReferenceEdge
* Rename FloatingPanelDefaultLayout to FloatingPanelBottomLayout
* Update FloatingPanelLayoutAdapter
* Add LayoutAdapter.sortedDirectionalPositions
* Reimplement positionY(for:)
* Add edge{most,least}state
* Add orderedStates
* Add edge{Most,Least} properties in LayoutAdapter
* Modify `bottomOverflow` value and rename it to `containerOverflow`
* Modify access to `layout` prop
* Add FloatingPanelLayoutAnchoring/LayoutAnchor/IntrinsicLayoutAnchor
* Add FloatingPanel{Intrinsic}LayoutAnchor tests
* Update FloatingPanelController
* Add surfaceLocation
* update addPanelToParent API
* Update layout reloading logic
* Rename updateLayout() to invalidateLayout()
* Fix contentViewController access level
* Update FloatingPanelControllerDelegate
* Add floatingPanelDidEndDragging(_ vc:willDecelerate:)
* Update floatingPanelWillBeginDecelerating delegate method
* Remove behavior delegate method
* Reimplement the removal action
* Use floatingPanel(_:shouldRemoveAt:with:) delegate
* Update SurfaceView
* Support bottom/left/right positioned panel.
* Add FloatingPanelSurfaceAppearance
* Add SurfaceView.intrinsicContentSize
* Rename FloatingPanelSurfaceView.add(contentView:)
* GrabberHandle for bottom edge grabber
* Rename GrabberHandleView to FloatingPanelGrabberView
* Rename containerMargin & contentInsets to content{Margins,Padding}
* Rename bottomOverflow to containerOverflow
* ObjC Support
* Add @objc to FloatingPanelControllerDelegate
* Add @objc to FloatingPanelController
* Use @objc protocol FloatingPanelBehavior
* Redefine FloatingPanelState for objc.
* Update Utils
* Modify logger prefix
* Update extensions for left/right positions
* Update unit tests
* Update layout tests
* Add test_surfaceView_{contentView,containerView}
* Add test_positionY_top2bottom()
* Add test_moveTo_bottomEdge()
* Update test_warningRetainCycle()
* Fix FloatingPanelControllerTests
* Fix LayoutTests
* Fix FloatingPanelStateTests
* Fix FloatingPanelTest
2020-07-11 09:48:25 +09:00
Shin Yamamoto
2cf63838ae
Drop preserveContentVCLayoutIfNeeded()
2020-07-11 09:48:25 +09:00
Shin Yamamoto
49e8545aec
Rename trackedScrollView to trackingSrollView
2020-07-11 09:48:25 +09:00
Shin Yamamoto
b34ea2444d
Disable dismissal action of the backdrop by default
...
fix #341
2020-07-11 09:48:25 +09:00
Shin Yamamoto
984d4c41d8
Replace 'precondition' to 'assert'
2020-07-11 09:48:25 +09:00
Shin Yamamoto
8d372452b4
Remove 'unavailable' annotations
2020-07-11 09:48:25 +09:00
Shin Yamamoto
2fc16bb1f4
Upgrade swift version to 5.0
2020-07-11 09:48:25 +09:00
Shin Yamamoto
e4548b26bd
Release 1.7.5
2020-06-03 22:33:02 +09:00
Shin Yamamoto
d540b1ddde
Fix the panel behavior in a sheet modal ( #358 )
...
* Add "Show Panel in Sheet Modal" sample
* Fix the behavior in a sheet modal
2020-06-03 22:31:30 +09:00
Shin Yamamoto
aaeb752911
No need to recognize both of the pan gesture and dismiss gesuter of sheet modal
2020-05-30 10:11:12 +09:00
Grigory
966caad519
Fix the constraints break on fitToBounds mode ( #359 )
2020-05-30 09:44:58 +09:00
Shin Yamamoto
7bbc3d5910
fix the behavior in a sheet modal
2020-05-23 08:12:01 +09:00
Shin Yamamoto
8cca1178fd
fix {top,bottom} constant's boundary in updating panel interactively ( #352 )
...
Because {top,bottom}Y can be {less,more} than the SafeArea/Superview bounds,
if a minus value is set to the inset for {top,bottom} most position.
2020-05-21 08:59:52 +09:00
Shin Yamamoto
a09a0e9e32
fix the animation velocity's sign ( #354 )
...
Using a directional distance to calculate an animation velocity fixes an
issue where a panel's animation was wrong when a user swipes up a panel
at the top most position.
2020-05-16 09:18:59 +09:00
Shin Yamamoto
43c76faa20
fix invalid safearea insets in a table view with static cells ( #353 )
...
See also https://github.com/SCENEE/FloatingPanel/issues/330
2020-05-16 09:17:34 +09:00
Shin Yamamoto
5787a350ab
fix the memory leak of FloatingPanelController object ( #350 )
2020-05-15 07:41:18 +09:00
Shin Yamamoto
9abb80de64
Fix an invalid indicator insets of the tracking scroll view ( #346 )
2020-04-29 14:22:34 +09:00
Shin Yamamoto
7d90458d99
Support the initial hidden position not including the supported positions ( #345 )
2020-04-29 14:20:49 +09:00
Shin Yamamoto
7c47e2e20e
Release 1.7.4
2020-02-29 13:25:11 +09:00
Federico Zanetello
8c24aa3fc9
fix api typo ( #325 )
...
fixes floatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning) name
2020-02-29 13:18:09 +09:00