项目
在 GitHub 查看
krzysztofzablocki/Strongify
关于
Strongify 是一个仅含单个文件的 µframework,提供更简洁的 API,帮助避免 weak-strong dance。
其他项目实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Strongify
1-file µframework that gets rid of weak-strong dancing in Swift.
Basically allows you to go from this:
target.closure = { [weak self, weak other] some, arguments in
guard let strongSelf = self, let strongOther = other else { return }
/// ... code
}
To this:
target.closure = strongify(weak: self, other) { strongSelf, strongOther, some, arguments in
/// ... code
}
Installation
Swift Package Manager
Add .Package(url: "https://github.com/krzysztofzablocki/Strongify.git", majorVersion: 1) to your Package.swift file's dependencies.
CocoaPods
Add pod 'Strongify' to your Podfile.
Carthage
Add github "krzysztofzablocki/Strongify" to your Cartfile.
License
Strongify is available under the MIT license. See LICENSE for more information.
Attributions
I've used SwiftPlate to generate xcodeproj compatible with SPM, CocoaPods and Carthage.
探索相关项目
加载中…