1
This commit is contained in:
parent
e1840a4fdb
commit
e53bb69d6f
1
Podfile
1
Podfile
@ -25,6 +25,7 @@ target 'ShortPlay' do
|
|||||||
pod 'ZFPlayer/AVPlayer' #播放器
|
pod 'ZFPlayer/AVPlayer' #播放器
|
||||||
pod 'KTVHTTPCache' #视频缓存
|
pod 'KTVHTTPCache' #视频缓存
|
||||||
pod 'HWPanModal' #底部弹出控制器
|
pod 'HWPanModal' #底部弹出控制器
|
||||||
|
pod 'Kingfisher' #图片加载
|
||||||
|
|
||||||
|
|
||||||
target 'ShortPlayTests' do
|
target 'ShortPlayTests' do
|
||||||
|
@ -2,6 +2,7 @@ PODS:
|
|||||||
- Alamofire (5.10.2)
|
- Alamofire (5.10.2)
|
||||||
- CocoaAsyncSocket (7.6.5)
|
- CocoaAsyncSocket (7.6.5)
|
||||||
- HWPanModal (0.9.9)
|
- HWPanModal (0.9.9)
|
||||||
|
- Kingfisher (8.3.1)
|
||||||
- KTVHTTPCache (3.0.2):
|
- KTVHTTPCache (3.0.2):
|
||||||
- CocoaAsyncSocket
|
- CocoaAsyncSocket
|
||||||
- MJRefresh (3.7.9)
|
- MJRefresh (3.7.9)
|
||||||
@ -21,6 +22,7 @@ PODS:
|
|||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- HWPanModal
|
- HWPanModal
|
||||||
|
- Kingfisher
|
||||||
- KTVHTTPCache
|
- KTVHTTPCache
|
||||||
- MJRefresh
|
- MJRefresh
|
||||||
- Moya
|
- Moya
|
||||||
@ -35,6 +37,7 @@ SPEC REPOS:
|
|||||||
- Alamofire
|
- Alamofire
|
||||||
- CocoaAsyncSocket
|
- CocoaAsyncSocket
|
||||||
- HWPanModal
|
- HWPanModal
|
||||||
|
- Kingfisher
|
||||||
- KTVHTTPCache
|
- KTVHTTPCache
|
||||||
- MJRefresh
|
- MJRefresh
|
||||||
- Moya
|
- Moya
|
||||||
@ -48,6 +51,7 @@ SPEC CHECKSUMS:
|
|||||||
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
|
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
|
||||||
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
||||||
HWPanModal: b57a6717d3cdcd666bff44f9dd2a5be9f4d6f5d2
|
HWPanModal: b57a6717d3cdcd666bff44f9dd2a5be9f4d6f5d2
|
||||||
|
Kingfisher: 3204d23de16b5ea53541c44ca5a8efb55741dec3
|
||||||
KTVHTTPCache: 5711692cdf9a5ecfe829b1e16577deb3ffe3dc86
|
KTVHTTPCache: 5711692cdf9a5ecfe829b1e16577deb3ffe3dc86
|
||||||
MJRefresh: ff9e531227924c84ce459338414550a05d2aea78
|
MJRefresh: ff9e531227924c84ce459338414550a05d2aea78
|
||||||
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
|
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
|
||||||
@ -57,6 +61,6 @@ SPEC CHECKSUMS:
|
|||||||
YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7
|
YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7
|
||||||
ZFPlayer: 5cf39e8d9f0c2394a014b0db4767b5b5a6bffe13
|
ZFPlayer: 5cf39e8d9f0c2394a014b0db4767b5b5a6bffe13
|
||||||
|
|
||||||
PODFILE CHECKSUM: 6b8807090aa7efc034949fa4dae871806b3d46fd
|
PODFILE CHECKSUM: 56661899b7b42659f95553caa85ba6ea5667ded3
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.16.2
|
||||||
|
@ -253,7 +253,6 @@
|
|||||||
mainGroup = 1DBC40502DA4EDFC0093FCB0;
|
mainGroup = 1DBC40502DA4EDFC0093FCB0;
|
||||||
minimizedProjectReferenceProxies = 1;
|
minimizedProjectReferenceProxies = 1;
|
||||||
packageReferences = (
|
packageReferences = (
|
||||||
1DBC41062DA4FC140093FCB0 /* XCRemoteSwiftPackageReference "Kingfisher" */,
|
|
||||||
);
|
);
|
||||||
preferredProjectObjectVersion = 77;
|
preferredProjectObjectVersion = 77;
|
||||||
productRefGroup = 1DBC405A2DA4EDFC0093FCB0 /* Products */;
|
productRefGroup = 1DBC405A2DA4EDFC0093FCB0 /* Products */;
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"originHash" : "917a2b512148612347b307b5f8d624e74df48af36fa322c80901a86fc0e1317f",
|
|
||||||
"pins" : [
|
|
||||||
{
|
|
||||||
"identity" : "kingfisher",
|
|
||||||
"kind" : "remoteSourceControl",
|
|
||||||
"location" : "https://github.com/onevcat/Kingfisher.git",
|
|
||||||
"state" : {
|
|
||||||
"revision" : "4c6b067f96953ee19526e49e4189403a2be21fb3",
|
|
||||||
"version" : "8.3.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"version" : 3
|
|
||||||
}
|
|
@ -47,53 +47,4 @@ extension SPLoginManager {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func performDependentRequestsWithOperations() {
|
|
||||||
let queue = OperationQueue()
|
|
||||||
|
|
||||||
// 1. 创建初始请求操作
|
|
||||||
let initialOperation = BlockOperation {
|
|
||||||
let semaphore = DispatchSemaphore(value: 0)
|
|
||||||
|
|
||||||
// initialRequest { result in
|
|
||||||
// defer { semaphore.signal() }
|
|
||||||
//
|
|
||||||
// if result.isSuccess {
|
|
||||||
// print("初始请求成功")
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
semaphore.wait()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. 创建依赖操作
|
|
||||||
let request1Operation = BlockOperation {
|
|
||||||
let semaphore = DispatchSemaphore(value: 0)
|
|
||||||
|
|
||||||
// request1 {
|
|
||||||
// print("请求1完成")
|
|
||||||
// semaphore.signal()
|
|
||||||
// }
|
|
||||||
|
|
||||||
semaphore.wait()
|
|
||||||
}
|
|
||||||
|
|
||||||
let request2Operation = BlockOperation {
|
|
||||||
let semaphore = DispatchSemaphore(value: 0)
|
|
||||||
|
|
||||||
// request2 {
|
|
||||||
// print("请求2完成")
|
|
||||||
// semaphore.signal()
|
|
||||||
// }
|
|
||||||
|
|
||||||
semaphore.wait()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 设置依赖关系
|
|
||||||
request1Operation.addDependency(initialOperation)
|
|
||||||
request2Operation.addDependency(initialOperation)
|
|
||||||
|
|
||||||
// 4. 添加操作到队列
|
|
||||||
queue.addOperations([initialOperation, request1Operation, request2Operation], waitUntilFinished: false)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user