🏅An Extension for Swift Enum Type
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
EnumCollection
Sample
docs
.gitignore
.swift-version
EnumCollection.podspec
LICENSE
README.md

README.md


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)