Swift#3 Enumeration

  • Enumeration(Enums) in swift are much more powerful than Objective C.
  • Unlike Obj C, Swift enums can assign strings, characters or floats as values for each member besides integers.
  • The Convenient toRaw() method returns the values assigned to each member.
  • Enums can also be parameterized (give or assign values to it.)
  • Swift structs can have method and are passed by value.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s