ObjectAssociation
认识
🏵 简介
ObjectAssociation是Swift扩展的对象关联辅助工具。
📋 要求
类型 | 要求 | |
---|---|---|
平台 |
iOS |
8.0+ |
macOS |
10.10 |
|
tvOS |
9.0 |
|
watchOS |
2.0 |
|
Linux |
不适用 |
|
IDE |
Xcode |
9.3+ |
语言 |
Swift |
5+ |
📲 安装
手动
将ObjectAssociation目录中的所有文件复制到您的项目中。
🛌 依赖
不适用
❤️ 贡献
欢迎fork和提交pull请求。
🔖 许可证
ObjectAssociation
是开源软件,署名为MIT许可证。
🔫 用法
import ObjectAssociation
extension NSObject {
private static let association = ObjectAssociation<String>()
public var uniqueIdentifier: String? {
get {
return NSObject.association[self]
}
set {
NSObject.association[self] = newValue
}
}
}