/EnumCollection

🏅An Extension for Swift Enum Type

Primary LanguageSwiftMIT LicenseMIT


Version Author Build Passing Swift
Platforms MIT
Cocoapods Carthage SPM

Introduction

What's this?

EnumCollection is an Extension for Swift Enum Type.

Requirements

  • iOS 8.0+
  • macOS 10.10+
  • watchOS 2.0+
  • tvOS 9.0+
  • Xcode 9 with Swift 4

Installation

CocoaPods

pod 'EnumCollection'

Contribution

You are welcome to fork and submit pull requests.

License

EnumCollection is open-sourced software, licensed under the MIT license.

Usage

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)