ThenFoundation
针对基础 THEN 进行封装,主要通过 .then 链式使用
let data = Data()
print(data.then.hexString)
class Man: NSObject {
var name: String = ""
}
let o = Man()
o.then.addNotification(name: NSNotification.Name("Test"), object: nil) { noti in
print(noti.userInfo as Any)
}.force { obj in
print(obj.name)
}.dispose()
安装
CocoaPods
pod 'ThenFoundation', :git => 'https://github.com/ghostcrying/ThenFoundation.git'
# , :tag => '1.0.0'
# 可根据tag指定使用
Carthage
github "ghostcrying/ThenFoundation"
Swift 包管理器
https://github.com/ghostcrying/ThenFoundation.git