Shin Yamamoto
22edf5ce46
Prevent unexpected crash
...
This assertion can be called unexpectedly by the gesture recognizer behavior
of UIScrollView
2019-02-23 10:28:34 +09:00
Shin Yamamoto
f43f7df7f3
Prevent calling didMove delegate when it's not moving
2019-02-23 10:28:34 +09:00
Shin Yamamoto
3a2633d818
Must update a panel layout after it becomes a new state
...
To synchronize layout updates in floatingPanelDidChangePosition(_:) by
a user
2019-02-23 10:28:34 +09:00
Shin Yamamoto
04a62bcf74
Refactor FloatingPanelSurfaceView for AutoLayout backed animation
2019-02-23 10:28:34 +09:00
Shin Yamamoto
6c1320168c
Fix a buggy scroll offset on a scroll inset change by a user
...
* The controller can bother a user who wants to adjust a scroll offset
for a position at `floatingPanelDidChangePosition()` delegate method.
* This prevents interrupting a tracking scroll offset at the end of interaction
2019-02-23 10:28:34 +09:00
Shin Yamamoto
8657c91002
Fix the boundary of the interactive top constraint
2019-02-23 10:28:34 +09:00
Shin Yamamoto
bafe492009
Normalize the projected position
...
It resolves the behavior is determined by the screen size.
2019-02-23 10:28:34 +09:00
Shin Yamamoto
c6197ef6a3
Modify the default momentum projection behavior
2019-02-23 10:28:34 +09:00
Shin Yamamoto
1b3f16bcd5
Fix disabling bottom constraints
2019-02-23 10:28:34 +09:00
Shin Yamamoto
0c30b68a9e
Update FloatingPanelFullScreenLayout spec
...
It's useful that all insets(tip, half and full) indicates a inset
from the superview, not the safe area because a user can layout
a floating panel regardless of the safe area or layout guides(iOS10)
whose values depend on iOS system behavior.
2019-02-21 19:19:48 +09:00
Shin Yamamoto
30c4bee432
Remove FloatingPanel.getCurrentY(from:with)
2019-02-21 19:19:48 +09:00
Shin Yamamoto
ece9ced085
Configure momentum project with FloatingPanelBehavior
...
* shouldProjectMomentum(_:for:)
* momentumProjectionRate(_:)
2019-02-21 19:19:48 +09:00
Shin Yamamoto
f231105752
Enable to cancel tracking a scroll view
2019-02-21 19:19:48 +09:00
Shin Yamamoto
91dfc1e086
Open the default layout/behavior
2019-02-21 19:19:48 +09:00
Shin Yamamoto
b2c59c17aa
Modify setBackdropAlpha(of:) as private
2019-02-21 19:19:48 +09:00
Shin Yamamoto
10d1a920f0
Add floatingPanelShouldBeginDragging(_:) delegate method
...
* Update doc comments
2019-02-21 19:19:48 +09:00
Shin Yamamoto
4cb79a14fc
Move the surface view with a top layout constraint
2019-02-21 19:19:48 +09:00
Shin Yamamoto
c39cc9d93b
Fix a regression of the interaction
2019-02-21 18:42:02 +09:00
Shin Yamamoto
fe18e493a9
Fix dragging outside safe area
2019-02-16 10:31:17 +09:00
Shin Yamamoto
5d14166508
Fix an interruptive animator handling
...
* A velocity parameter passed by an animator had a wrong sign so that an
interruptive animator could be buggy.
* Improve the default pan gesture recognizer to interrupt an animation smoothly.
2019-02-16 10:29:11 +09:00
Shin Yamamoto
e1a745e3b5
Clean up
2019-02-15 15:02:10 +09:00
Shin Yamamoto
a0cac28ed0
Improve {re}directional position calc
2019-02-15 15:02:10 +09:00
Shin Yamamoto
c205dc8672
Improve animator handling
2019-02-15 15:02:10 +09:00
Shin Yamamoto
5c0ed4cf7d
Fix the wrong layout update on iOS10
...
On iOS 10, there is a case when a floating panel is updated by a
different position(the previous position) from the target position in
animating. This is because `FloatingPanelController` calls
`update(safeAreaInsets:)` in `viewDidLayoutSubviews()` unexpectedly.
2019-02-15 10:29:01 +09:00
Shin Yamamoto
780472a17f
Stop unexpected scrolling by decelerating on tip and half
2019-02-15 10:15:34 +09:00
Shin Yamamoto
0264db3d54
Should always recognize tap/long press gestures in parallel
2019-02-15 09:55:36 +09:00
Anton Glezman
21be693a9a
Fix issue with jumping floating panel while dragging
2019-02-11 12:28:13 +03:00
Shin Yamamoto
4f56b57b0e
Replace FloatingPanel.panGesture with panGestureRecognizer
2019-02-05 22:10:03 +09:00
Shin Yamamoto
6aa739231d
Expand the surface mask's height
...
`FloatingPanelSurfaceView.updateContentViewMask()` causes a content to be cut off.
2019-02-01 10:19:51 +09:00
Shin Yamamoto
7f025ae845
Remove the unnecessary code to fix the presentation modally
...
It's added at `a095ace` commit, but now not needed by the previous
commit.
2019-01-31 12:48:36 +09:00
Shin Yamamoto
1b2dae2135
Fix presentation modally when fpc is reused
2019-01-30 13:09:04 +09:00
Damiaan Twelker
49e868a505
restore original scroll view delegate when updating content viewcontroller
2019-01-26 12:41:17 +01:00
Shin Yamamoto
2c72d07cab
Merge pull request #97 from SCENEE/support-full-screen
...
Support full screen layout
2019-01-19 16:41:32 +09:00
Shin Yamamoto
31c057f9f8
Fix typo
2019-01-19 14:53:36 +09:00
Shin Yamamoto
d3033df9da
Add FloatingPanelFullScreenLayout doc comment
2019-01-19 14:51:04 +09:00
Shin Yamamoto
85d7ca640e
Stop manipulating a scroll content inset for FloatingPanelFullScreenLayout
...
It's better that the manipulation should be operated in a user application code.
2019-01-19 14:06:23 +09:00
Shin Yamamoto
a2a10bd0d3
Merge pull request #104 from SCENEE/fix-modal-presentation
...
Fix the modal presentation
2019-01-15 09:31:39 +09:00
Cedric Gatay
08d275690a
fix(delegateIgnored): fix for animation use case
...
Do not force update layout to allow the user to animate the change later on.
2019-01-14 11:05:50 +01:00
Cedric Gatay
1c307f751e
fix(delegateIgnored): listen on delegate change
...
Properly listens for delegate changes and trigger behavior / layout changes accordingly.
Made constructor parameter name explicit.
2019-01-14 08:49:23 +01:00
Cedric Gatay
6f06a0f7fc
fix(delegateIgnored): Allow to set delegate on init
...
Typical use case is :
```
let floatingVC = FloatingPanelController()
floatingVC.delegate = self
```
This PR allows to set the delegate straight away by using `let floatingVC = FloatingPanelController(self)`
Its true reason is that the setup code that fetches behavior / layout through delegate is called without the delegate being set is useless on `init`ing.
Another implementation could be observing the `didSet` event on delegate to do the `setUp` for `FloatingPanel`
2019-01-12 15:15:48 +01:00
Shin Yamamoto
a095ace30e
Fix the modal presentation
2019-01-11 19:04:39 +09:00
Shin Yamamoto
a486f61f5f
Merge pull request #102 from SCENEE/fix-secound-touch-crash
...
Fix a crash on tap dismissal with a second touch
2019-01-10 09:38:06 +09:00
Shin Yamamoto
32203c48bd
Fix unsatisfiable constraints error for safe area bottom on full state
2019-01-10 09:05:17 +09:00
Shin Yamamoto
9d6024f603
Fix a crash on tap dismissal with a second touch
...
For example, a user tap the backdrop view to dismiss it while dragging
the surface view on presentation modally.
2019-01-10 08:43:46 +09:00
Shin Yamamoto
a4dd4e48e7
Merge pull request #98 from SCENEE/support-swift4.1
...
Support Swift 4.1
2019-01-10 08:25:50 +09:00
Shin Yamamoto
fca79c9b0c
Fix the event handling on presentation modally
...
If an alpha of the controller's backdrop view is zero, the presentation controller
must not block any touch event outside of surface view.
2019-01-09 09:32:17 +09:00
Shin Yamamoto
4ad7f11e93
Support Swift 4.1
2019-01-05 21:44:05 +09:00
Shin Yamamoto
0412bdc996
Support full screen layout
2019-01-05 12:26:49 +09:00
Shin Yamamoto
aa23e404e1
Fix a content offset of a tracking scroll view
...
This bug only happens on 'Shoe Tab Bar' in Samples app on landscape
orientation.
2018-12-28 16:08:10 +09:00
Shin Yamamoto
4c0749640f
Remove an unnecessary comment
2018-12-28 15:13:59 +09:00