An open API service indexing awesome lists of open source software.

https://github.com/meniny/enumcollection

πŸ…An Extension for Swift Enum Type
https://github.com/meniny/enumcollection

enum swift

Last synced: 11 months ago
JSON representation

πŸ…An Extension for Swift Enum Type

Awesome Lists containing this project

README

          





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

```ruby
pod 'EnumCollection'
```

## Contribution

You are welcome to fork and submit pull requests.

## License

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

## Usage

```swift
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)
```