Page 8

Swift

Difference between Associated Values and Raw Values ...................................................................... 96 Enum with Associated Values .............................................................................................................. 96 Enum with Raw Values ........................................................................................................................ 97

19.

SWIFT – STRUCTURES ...................................................................................................... 99 Definition of a Structure ...................................................................................................................... 99 Accessing the Structure and its Properties ........................................................................................... 99 Best Usage Practices of Structures ..................................................................................................... 101

20.

SWIFT – CLASSES............................................................................................................ 103 Class Identity Operators .................................................................................................................... 105

21.

SWIFT – PROPERTIES...................................................................................................... 107 Stored Properties .............................................................................................................................. 107 Lazy Stored Property ......................................................................................................................... 109 Instance Variables ............................................................................................................................. 109 Computed Properties ........................................................................................................................ 109 Local and Global Variables ................................................................................................................. 112 Type Properties ................................................................................................................................. 112 Querying and Setting Properties ........................................................................................................ 113

22.

SWIFT – METHODS......................................................................................................... 115 Instance Methods .............................................................................................................................. 115 Local and External Parameter Names ................................................................................................ 116 External Parameter Name with # and _ Symbol................................................................................. 117 Self property in Methods ................................................................................................................... 118 Modifying Value Types from Instance Methods ................................................................................ 119 Self Property for Mutating Method ................................................................................................... 120 Type Methods ................................................................................................................................... 121

vii

​Quick is a effective and user-friendly coding language for macOS, iOS, watchOS and tvOS....  

...

Read more
Read more
Similar to
Popular now
Just for you