上QQ阅读APP看书,第一时间看更新
Getting ready
Now, we will pe into enumerations and get our hands dirty with it. To do so, we will create a new playground file in Xcode called Enumerations so that we can practice how to use enumerations and also see how it works.
Writing enumerations is meant to be easy, readable, and straightforward in syntax writing in Swift. Let's see how enum syntax goes:
enum EnumName{ }
You see how it's easy to create enums; your enumeration definition goes inside the curly braces.