车辆监控优化
This commit is contained in:
@@ -35,6 +35,8 @@ open class DDUIPanGestureRecognizer : UIPanGestureRecognizer {
|
||||
|
||||
public var panGesValue = PanGesValue.init()
|
||||
|
||||
public var expandLevelChangedHandler : ((_ oldExpandLevel: ExpandLevel, _ newExpandLevel: ExpandLevel) -> Void)?
|
||||
|
||||
/// 会执行默认方法
|
||||
/// - Parameter target: target
|
||||
public init() {
|
||||
@@ -137,6 +139,9 @@ open class DDUIPanGestureRecognizer : UIPanGestureRecognizer {
|
||||
/// 记录当前的currentY
|
||||
panGesValue.currentY = currentY
|
||||
|
||||
/// 上一次expandLevel
|
||||
let oldExpandLevel = panGesValue.expandLevel
|
||||
|
||||
/// 记录当前的expandLevel
|
||||
if panGesValue.currentY == minY {
|
||||
panGesValue.expandLevel = .max
|
||||
@@ -146,6 +151,16 @@ open class DDUIPanGestureRecognizer : UIPanGestureRecognizer {
|
||||
panGesValue.expandLevel = .default
|
||||
}
|
||||
|
||||
/// 新的expandLevel
|
||||
let newExpandLevel = panGesValue.expandLevel
|
||||
|
||||
/// expandLevel改变时回调
|
||||
if oldExpandLevel != newExpandLevel {
|
||||
if let expandLevelChangedHandler = expandLevelChangedHandler {
|
||||
expandLevelChangedHandler(oldExpandLevel,newExpandLevel)
|
||||
}
|
||||
}
|
||||
|
||||
UIView.animate(withDuration: duration, animations: {[weak self] in
|
||||
self?.view?.frame = CGRectMake(viewFrame.origin.x, currentY, viewFrame.size.width, viewFrame.size.height)
|
||||
})
|
||||
|
||||
12
Pods/Manifest.lock
generated
12
Pods/Manifest.lock
generated
@@ -283,9 +283,9 @@ PODS:
|
||||
- DDTimerSwiftKit_Private (0.2.1):
|
||||
- DDLogKit_Private/SwiftLog
|
||||
- DDToastKit_Private (0.1.2)
|
||||
- DDUIGestureRecognizer (0.1.5):
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (= 0.1.5)
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (0.1.5)
|
||||
- DDUIGestureRecognizer (0.1.6):
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (= 0.1.6)
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (0.1.6)
|
||||
- DDUtilsSwiftKit_Private (0.1.1):
|
||||
- DDUtilsSwiftKit_Private/ApplicationInfo (= 0.1.1)
|
||||
- DDUtilsSwiftKit_Private/DeviceInfo (= 0.1.1)
|
||||
@@ -352,7 +352,7 @@ DEPENDENCIES:
|
||||
- DDProgressHUDKit_Private
|
||||
- DDTimerSwiftKit_Private
|
||||
- DDToastKit_Private
|
||||
- DDUIGestureRecognizer (= 0.1.5)
|
||||
- DDUIGestureRecognizer (= 0.1.6)
|
||||
- DDUtilsSwiftKit_Private
|
||||
- DDWebImageKit_Private
|
||||
- DDZFPlayerKit_Private/ControlView
|
||||
@@ -441,7 +441,7 @@ SPEC CHECKSUMS:
|
||||
DDProgressHUDKit_Private: 1e219062ddeb7801a4bb13b367efa1f3fbf17f1e
|
||||
DDTimerSwiftKit_Private: cce3fe58b1b581fe4cddb3fb84fcde31b4e83541
|
||||
DDToastKit_Private: b6ae3709d110cadca503a037419f3709d1755256
|
||||
DDUIGestureRecognizer: e7b1b6d4d73e2fc2c48dcfb38655881814d094ff
|
||||
DDUIGestureRecognizer: b7503ff61b471a7e394397a415a297b234929f71
|
||||
DDUtilsSwiftKit_Private: 03575cb3204cd43f3521049263f4b6cae3e64700
|
||||
DDWebImageKit_Private: b905111547e44626773b729bae9030403a9a0c76
|
||||
DDZFPlayerKit_Private: 5f63a8101e35ffd7b2568f551cbf33b8bedc48ba
|
||||
@@ -461,6 +461,6 @@ SPEC CHECKSUMS:
|
||||
SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6
|
||||
ZLPhotoBrowser: 0563c2bfc7b247b65d023d646012f46cba94101b
|
||||
|
||||
PODFILE CHECKSUM: 42053b92ac9e24ed76797463ba14cc31e3771ffc
|
||||
PODFILE CHECKSUM: 2e0cc301f049eb136c4bc3fa33f6047cd0e03e64
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
|
||||
Reference in New Issue
Block a user