介绍
这是什么?
EnumCollection
是一个针对Swift枚举类型的扩展。
要求
- iOS 8.0+
- macOS 10.10+
- watchOS 2.0+
- tvOS 9.0+
- Xcode 9与Swift 4
安装
cocoa pods
pod 'EnumCollection'
贡献
欢迎您进行Fork并提交Pull Request。
许可证
EnumCollection
是一个开源软件,按照 MIT
许可证授权。
使用
import EnumCollection
public enum SomeEnumType: Int, EnumCollection {
case a, b, c
}
for s in SomeEnumType.allValues {
print(s.rawValue)
}
let raws = SomeEnumType.allRaws
print(raws)