Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d86bd5d02 | |||
| 3b6271c4f4 | |||
| 1671a3d50f | |||
| 0ab318e804 |
@@ -1,7 +1,7 @@
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
s.name = "FloatingPanel"
|
||||
s.version = "1.6.3"
|
||||
s.version = "1.6.4"
|
||||
s.summary = "FloatingPanel is a clean and easy-to-use UI component of a floating panel interface."
|
||||
s.description = <<-DESC
|
||||
FloatingPanel is a clean and easy-to-use UI component for a new interface introduced in Apple Maps, Shortcuts and Stocks app.
|
||||
|
||||
@@ -337,9 +337,14 @@ class FloatingPanel: NSObject, UIGestureRecognizerDelegate {
|
||||
log.debug("panel gesture(\(state):\(panGesture.state)) --",
|
||||
"translation = \(translation.y), location = \(location.y), velocity = \(velocity.y)")
|
||||
|
||||
if interactionInProgress == false, isDecelerating == false,
|
||||
let vc = viewcontroller, vc.delegate?.floatingPanelShouldBeginDragging(vc) == false {
|
||||
return
|
||||
}
|
||||
|
||||
if let animator = self.animator {
|
||||
guard surfaceView.presentationFrame.minY >= layoutAdapter.topMaxY else { return }
|
||||
log.debug("panel animation interrupted!!!")
|
||||
log.debug("panel animation(interruptible: \(animator.isInterruptible)) interrupted!!!")
|
||||
if animator.isInterruptible {
|
||||
animator.stopAnimation(false)
|
||||
// A user can stop a panel at the nearest Y of a target position so this fine-tunes
|
||||
@@ -354,12 +359,6 @@ class FloatingPanel: NSObject, UIGestureRecognizerDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
if interactionInProgress == false,
|
||||
let vc = viewcontroller,
|
||||
vc.delegate?.floatingPanelShouldBeginDragging(vc) == false {
|
||||
return
|
||||
}
|
||||
|
||||
if panGesture.state == .began {
|
||||
panningBegan(at: location)
|
||||
return
|
||||
@@ -376,6 +375,15 @@ class FloatingPanel: NSObject, UIGestureRecognizerDelegate {
|
||||
}
|
||||
panningChange(with: translation)
|
||||
case .ended, .cancelled, .failed:
|
||||
if interactionInProgress == false {
|
||||
startInteraction(with: translation, at: location)
|
||||
// Workaround: Prevent stopping the surface view b/w anchors if the pan gesture
|
||||
// doesn't pass through .changed state after an interruptible animator is interrupted.
|
||||
let dy = translation.y - .leastNonzeroMagnitude
|
||||
layoutAdapter.updateInteractiveTopConstraint(diff: dy,
|
||||
allowsTopBuffer: true,
|
||||
with: behavior)
|
||||
}
|
||||
panningEnd(with: translation, velocity: velocity)
|
||||
default:
|
||||
break
|
||||
|
||||
@@ -454,6 +454,7 @@ class FloatingPanelLayoutAdapter {
|
||||
func activateLayout(of state: FloatingPanelPosition) {
|
||||
defer {
|
||||
surfaceView.superview!.layoutIfNeeded()
|
||||
log.debug("activateLayout -- surface.presentation = \(self.surfaceView.presentationFrame) surface.frame = \(self.surfaceView.frame)")
|
||||
}
|
||||
|
||||
var state = state
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.6.3</string>
|
||||
<string>1.6.4</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
</dict>
|
||||
|
||||
Reference in New Issue
Block a user