更新pod
This commit is contained in:
Binary file not shown.
2
Podfile
2
Podfile
@@ -39,7 +39,7 @@ target 'OrderScheduling' do
|
||||
pod 'Bugly'
|
||||
pod 'SwiftyRSA'
|
||||
pod 'DDPersistenceKit_Private'
|
||||
pod 'DDUIGestureRecognizer', :path => '/Users/zd/Desktop/PodRepository/DDUIGestureRecognizer'
|
||||
pod 'DDUIGestureRecognizer', '0.1.4'
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
|
||||
17
Podfile.lock
17
Podfile.lock
@@ -282,9 +282,9 @@ PODS:
|
||||
- DDTimerSwiftKit_Private (0.2.1):
|
||||
- DDLogKit_Private/SwiftLog
|
||||
- DDToastKit_Private (0.1.2)
|
||||
- DDUIGestureRecognizer (0.1.3):
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (= 0.1.3)
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (0.1.3)
|
||||
- DDUIGestureRecognizer (0.1.4):
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (= 0.1.4)
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (0.1.4)
|
||||
- DDUtilsSwiftKit_Private (0.1.1):
|
||||
- DDUtilsSwiftKit_Private/ApplicationInfo (= 0.1.1)
|
||||
- DDUtilsSwiftKit_Private/DeviceInfo (= 0.1.1)
|
||||
@@ -351,7 +351,7 @@ DEPENDENCIES:
|
||||
- DDProgressHUDKit_Private
|
||||
- DDTimerSwiftKit_Private
|
||||
- DDToastKit_Private
|
||||
- DDUIGestureRecognizer (from `/Users/zd/Desktop/PodRepository/DDUIGestureRecognizer`)
|
||||
- DDUIGestureRecognizer (= 0.1.4)
|
||||
- DDUtilsSwiftKit_Private
|
||||
- DDWebImageKit_Private
|
||||
- DDZFPlayerKit_Private/ControlView
|
||||
@@ -387,6 +387,7 @@ SPEC REPOS:
|
||||
- DDProgressHUDKit_Private
|
||||
- DDTimerSwiftKit_Private
|
||||
- DDToastKit_Private
|
||||
- DDUIGestureRecognizer
|
||||
- DDUtilsSwiftKit_Private
|
||||
- DDWebImageKit_Private
|
||||
- DDZFPlayerKit_Private
|
||||
@@ -415,10 +416,6 @@ SPEC REPOS:
|
||||
- SwiftyRSA
|
||||
- ZLPhotoBrowser
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
DDUIGestureRecognizer:
|
||||
:path: "/Users/zd/Desktop/PodRepository/DDUIGestureRecognizer"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7
|
||||
AMapFoundation-NO-IDFA: 6ce0ef596d4eb8d934ff498e56747b6de1247b05
|
||||
@@ -443,7 +440,7 @@ SPEC CHECKSUMS:
|
||||
DDProgressHUDKit_Private: 1e219062ddeb7801a4bb13b367efa1f3fbf17f1e
|
||||
DDTimerSwiftKit_Private: cce3fe58b1b581fe4cddb3fb84fcde31b4e83541
|
||||
DDToastKit_Private: b6ae3709d110cadca503a037419f3709d1755256
|
||||
DDUIGestureRecognizer: a982a64f406b79649e61bb04ea74edf766d9abc7
|
||||
DDUIGestureRecognizer: 207a58f9c0123664ff8d9d323d94e1481975b696
|
||||
DDUtilsSwiftKit_Private: 03575cb3204cd43f3521049263f4b6cae3e64700
|
||||
DDWebImageKit_Private: b905111547e44626773b729bae9030403a9a0c76
|
||||
DDZFPlayerKit_Private: 5f63a8101e35ffd7b2568f551cbf33b8bedc48ba
|
||||
@@ -463,6 +460,6 @@ SPEC CHECKSUMS:
|
||||
SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6
|
||||
ZLPhotoBrowser: 0563c2bfc7b247b65d023d646012f46cba94101b
|
||||
|
||||
PODFILE CHECKSUM: 9fc07eabd4fa5dd9a6251d8c52567b53b4ea6e85
|
||||
PODFILE CHECKSUM: b8d52ee7c2693a0587d0eddb0f63d9e164d97c2d
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
|
||||
@@ -11,12 +11,18 @@ open class DDUIPanGestureRecognizer : UIPanGestureRecognizer {
|
||||
case bottom,top
|
||||
}
|
||||
|
||||
|
||||
public enum ExpandLevel {
|
||||
case min,`default`,max
|
||||
}
|
||||
|
||||
public struct PanGesValue {
|
||||
public var from : PanGestureFromType = .bottom
|
||||
public var minDisplayHeight : CGFloat = 0
|
||||
public var maxDisplayHeight : CGFloat = 0
|
||||
public var criticalValue : CGFloat?
|
||||
public var isExpanded : Bool = false
|
||||
public var from : PanGestureFromType = .bottom /// 从什么位置弹出
|
||||
public var minDisplayHeight : CGFloat = 0 /// 最小显示的高度
|
||||
public var defaultDisplayHeight : CGFloat = 0 /// 默认弹出的高度
|
||||
public var maxDisplayHeight : CGFloat = 0 /// 最大显示的高度
|
||||
public var criticalValue : CGFloat? /// 标记当前需要完全展开时的临界值
|
||||
public var expandLevel : ExpandLevel = .min /// 标记当前是否是展开的状态
|
||||
internal var translationY : CGFloat = 0
|
||||
internal var currentY : CGFloat = 0
|
||||
}
|
||||
@@ -37,32 +43,7 @@ open class DDUIPanGestureRecognizer : UIPanGestureRecognizer {
|
||||
}
|
||||
|
||||
@objc fileprivate func panGesAction(ges: DDUIPanGestureRecognizer) {
|
||||
guard let superView = ges.view?.superview else {
|
||||
assert(false,"父类都没有,拖什么拖")
|
||||
return
|
||||
}
|
||||
|
||||
let superViewFrame = superView.frame
|
||||
let viewFrame = ges.view?.frame ?? .zero
|
||||
let superViewH = superViewFrame.size.height
|
||||
let viewH = viewFrame.size.height
|
||||
|
||||
switch ges.panGesValue.from {
|
||||
case .bottom:
|
||||
/// 拖动的view的最小y值,这个值和view的高度有关,view的最大y值要和它的superView的最大y值相等,所以minY可能等于deltaH
|
||||
var minY = superViewH - ges.panGesValue.maxDisplayHeight
|
||||
let deltaH = superViewH - viewH
|
||||
if deltaH > minY {
|
||||
minY = deltaH
|
||||
}
|
||||
|
||||
/// 拖动的view的最大y值
|
||||
var maxY = superViewH - ges.panGesValue.minDisplayHeight
|
||||
if deltaH > maxY {
|
||||
maxY = deltaH
|
||||
}
|
||||
|
||||
var currentY : CGFloat = 0.0
|
||||
getBaseValue(duration: 0.1) { viewFrame, minY, defaultY, maxY, currentY in
|
||||
switch ges.state {
|
||||
case .began:
|
||||
currentY = viewFrame.origin.y
|
||||
@@ -74,17 +55,6 @@ open class DDUIPanGestureRecognizer : UIPanGestureRecognizer {
|
||||
ges.panGesValue.translationY = translationPoint.y
|
||||
|
||||
currentY = (viewFrame.origin.y) + deltaY
|
||||
|
||||
/// 当到达最小y值时返回
|
||||
if currentY < minY {
|
||||
return
|
||||
}
|
||||
|
||||
/// 当到达最大y值时返回
|
||||
if currentY > maxY {
|
||||
return
|
||||
}
|
||||
|
||||
break
|
||||
case .ended:
|
||||
/// 当拖动的距离到达某个值时就完全显示
|
||||
@@ -93,12 +63,8 @@ open class DDUIPanGestureRecognizer : UIPanGestureRecognizer {
|
||||
|
||||
if ges.panGesValue.currentY < criticalY {
|
||||
currentY = minY
|
||||
/// 已经展开
|
||||
ges.panGesValue.isExpanded = true
|
||||
}else{
|
||||
currentY = maxY
|
||||
/// 未展开
|
||||
ges.panGesValue.isExpanded = false
|
||||
}
|
||||
ges.panGesValue.translationY = 0
|
||||
break
|
||||
@@ -106,17 +72,86 @@ open class DDUIPanGestureRecognizer : UIPanGestureRecognizer {
|
||||
currentY = viewFrame.origin.y
|
||||
break
|
||||
}
|
||||
ges.panGesValue.currentY = currentY
|
||||
}
|
||||
}
|
||||
|
||||
UIView.animate(withDuration: 0.1, animations: {
|
||||
ges.view?.frame = CGRectMake(viewFrame.origin.x, currentY, viewFrame.size.width, viewFrame.size.height)
|
||||
func getBaseValue(duration: TimeInterval,baseValueHandler: (_ viewFrame: CGRect, _ minY: CGFloat, _ defaultY: CGFloat, _ maxY: CGFloat,_ currentY: inout CGFloat) -> Void) {
|
||||
guard let superView = view?.superview else {
|
||||
assert(false,"父类都没有,拖什么拖")
|
||||
return
|
||||
}
|
||||
|
||||
let superViewFrame = superView.frame
|
||||
let viewFrame = view?.frame ?? .zero
|
||||
let superViewH = superViewFrame.size.height
|
||||
let viewH = viewFrame.size.height
|
||||
|
||||
switch panGesValue.from {
|
||||
case .bottom:
|
||||
/// 拖动的view的最小y值,这个值和view的高度有关,view的最大y值要和它的superView的最大y值相等,所以minY可能等于deltaH
|
||||
var minY = superViewH - panGesValue.maxDisplayHeight
|
||||
let deltaH = superViewH - viewH
|
||||
if deltaH > minY {
|
||||
minY = deltaH
|
||||
}
|
||||
|
||||
/// 拖动的view的最大y值
|
||||
var maxY = superViewH - panGesValue.minDisplayHeight
|
||||
if deltaH > maxY {
|
||||
maxY = deltaH
|
||||
}
|
||||
|
||||
/// 默认弹出的y值
|
||||
var defaultY = superViewH - panGesValue.defaultDisplayHeight
|
||||
if deltaH > defaultY {
|
||||
defaultY = deltaH
|
||||
}
|
||||
|
||||
var currentY : CGFloat = 0.0
|
||||
|
||||
/// 计算值
|
||||
baseValueHandler(viewFrame,minY,defaultY,maxY,¤tY)
|
||||
|
||||
/// 当到达最小y值时返回
|
||||
if currentY < minY {
|
||||
return
|
||||
}
|
||||
|
||||
/// 当到达最大y值时返回
|
||||
if currentY > maxY {
|
||||
return
|
||||
}
|
||||
|
||||
panGesValue.currentY = currentY
|
||||
|
||||
if panGesValue.currentY == minY {
|
||||
panGesValue.expandLevel = .max
|
||||
}else if panGesValue.currentY == maxY {
|
||||
panGesValue.expandLevel = .min
|
||||
}else if panGesValue.currentY == defaultY {
|
||||
panGesValue.expandLevel = .default
|
||||
}
|
||||
|
||||
UIView.animate(withDuration: duration, animations: {[weak self] in
|
||||
self?.view?.frame = CGRectMake(viewFrame.origin.x, currentY, viewFrame.size.width, viewFrame.size.height)
|
||||
})
|
||||
break
|
||||
default:
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public func expand(_ expand: ExpandLevel) {
|
||||
getBaseValue(duration: 0.25) { viewFrame, minY, defaultY, maxY, currentY in
|
||||
if expand == .max {
|
||||
currentY = minY
|
||||
}else if expand == .min {
|
||||
currentY = maxY
|
||||
}else if expand == .default {
|
||||
currentY = defaultY
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension UIView {
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "DDUIGestureRecognizer",
|
||||
"version": "0.1.3",
|
||||
"summary": "A short description of DDUIGestureRecognizer.",
|
||||
"description": "TODO: Add long description of the pod here.",
|
||||
"homepage": "https://github.com/DDIsFriend/DDUIGestureRecognizer",
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"file": "LICENSE"
|
||||
},
|
||||
"authors": {
|
||||
"DDIsFriend": "DDIsFriend@163.com"
|
||||
},
|
||||
"source": {
|
||||
"git": "git@github.com:DDIsFriend/DDUIGestureRecognizer.git",
|
||||
"tag": "0.1.3"
|
||||
},
|
||||
"platforms": {
|
||||
"ios": "12.0"
|
||||
},
|
||||
"swift_versions": "4.0",
|
||||
"subspecs": [
|
||||
{
|
||||
"name": "DDUIPanGestureRecognizer",
|
||||
"source_files": "DDUIGestureRecognizer/Classes/DDUIPanGestureRecognizer/**/*"
|
||||
}
|
||||
],
|
||||
"swift_version": "4.0"
|
||||
}
|
||||
17
Pods/Manifest.lock
generated
17
Pods/Manifest.lock
generated
@@ -282,9 +282,9 @@ PODS:
|
||||
- DDTimerSwiftKit_Private (0.2.1):
|
||||
- DDLogKit_Private/SwiftLog
|
||||
- DDToastKit_Private (0.1.2)
|
||||
- DDUIGestureRecognizer (0.1.3):
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (= 0.1.3)
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (0.1.3)
|
||||
- DDUIGestureRecognizer (0.1.4):
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (= 0.1.4)
|
||||
- DDUIGestureRecognizer/DDUIPanGestureRecognizer (0.1.4)
|
||||
- DDUtilsSwiftKit_Private (0.1.1):
|
||||
- DDUtilsSwiftKit_Private/ApplicationInfo (= 0.1.1)
|
||||
- DDUtilsSwiftKit_Private/DeviceInfo (= 0.1.1)
|
||||
@@ -351,7 +351,7 @@ DEPENDENCIES:
|
||||
- DDProgressHUDKit_Private
|
||||
- DDTimerSwiftKit_Private
|
||||
- DDToastKit_Private
|
||||
- DDUIGestureRecognizer (from `/Users/zd/Desktop/PodRepository/DDUIGestureRecognizer`)
|
||||
- DDUIGestureRecognizer (= 0.1.4)
|
||||
- DDUtilsSwiftKit_Private
|
||||
- DDWebImageKit_Private
|
||||
- DDZFPlayerKit_Private/ControlView
|
||||
@@ -387,6 +387,7 @@ SPEC REPOS:
|
||||
- DDProgressHUDKit_Private
|
||||
- DDTimerSwiftKit_Private
|
||||
- DDToastKit_Private
|
||||
- DDUIGestureRecognizer
|
||||
- DDUtilsSwiftKit_Private
|
||||
- DDWebImageKit_Private
|
||||
- DDZFPlayerKit_Private
|
||||
@@ -415,10 +416,6 @@ SPEC REPOS:
|
||||
- SwiftyRSA
|
||||
- ZLPhotoBrowser
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
DDUIGestureRecognizer:
|
||||
:path: "/Users/zd/Desktop/PodRepository/DDUIGestureRecognizer"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7
|
||||
AMapFoundation-NO-IDFA: 6ce0ef596d4eb8d934ff498e56747b6de1247b05
|
||||
@@ -443,7 +440,7 @@ SPEC CHECKSUMS:
|
||||
DDProgressHUDKit_Private: 1e219062ddeb7801a4bb13b367efa1f3fbf17f1e
|
||||
DDTimerSwiftKit_Private: cce3fe58b1b581fe4cddb3fb84fcde31b4e83541
|
||||
DDToastKit_Private: b6ae3709d110cadca503a037419f3709d1755256
|
||||
DDUIGestureRecognizer: a982a64f406b79649e61bb04ea74edf766d9abc7
|
||||
DDUIGestureRecognizer: 207a58f9c0123664ff8d9d323d94e1481975b696
|
||||
DDUtilsSwiftKit_Private: 03575cb3204cd43f3521049263f4b6cae3e64700
|
||||
DDWebImageKit_Private: b905111547e44626773b729bae9030403a9a0c76
|
||||
DDZFPlayerKit_Private: 5f63a8101e35ffd7b2568f551cbf33b8bedc48ba
|
||||
@@ -463,6 +460,6 @@ SPEC CHECKSUMS:
|
||||
SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6
|
||||
ZLPhotoBrowser: 0563c2bfc7b247b65d023d646012f46cba94101b
|
||||
|
||||
PODFILE CHECKSUM: 9fc07eabd4fa5dd9a6251d8c52567b53b4ea6e85
|
||||
PODFILE CHECKSUM: b8d52ee7c2693a0587d0eddb0f63d9e164d97c2d
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
|
||||
15318
Pods/Pods.xcodeproj/project.pbxproj
generated
15318
Pods/Pods.xcodeproj/project.pbxproj
generated
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fm
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../../PodRepository/DDUIGestureRecognizer
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDUIGestureRecognizer
|
||||
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
|
||||
@@ -5,7 +5,7 @@ OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fm
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../../PodRepository/DDUIGestureRecognizer
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDUIGestureRecognizer
|
||||
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
|
||||
Reference in New Issue
Block a user