Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Enums in Swift

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →
Avatar for Bilal Bilal
December 22, 2018

Enums in Swift

Enum in Swift presentation, GCD Istanbul and NSIstanbul #swiftday18

An enumeration defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code.

Avatar for Bilal

Bilal

December 22, 2018

Other Decks in Technology

Transcript

  1. DEFINITION ▸ Group of related values ▸ Type-safe ▸ User

    defined data type ▸ Aliases for integer values in C, Objective-C. ▸ Much more flexible in Swift ▸ Used anywhere Apple: "An enumeration defines a common type for a group of related values and enables you to work with those values in a type-safe way within your code."
  2. RESOURCES ▸ Apple Swift Doc: https://docs.swift.org/swift-book/ LanguageGuide/Enumerations.html ▸ Codable: https://littlebitesofcocoa.com/318-codable-

    enums ▸ Alamofire: https://github.com/Alamofire/Alamofire ▸ Moya: https://github.com/Moya/Moya ▸ ViewModelState: https://github.com/arslanbilal/Moviest