Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

define enum swift

Struct : Value Type | No Inheritance | No Deinitializers | No Type casting
Class : Reference Type | Inheritance supported | Has Deinitializers | Type casting

Common factors between struct and class:
Both allows to define properties to store values
Both allows to define methods
Both allows to define subscripts 
Both allows to define initializers
Both allows extension and protocols 
Source by www.hackingwithswift.com #
 
PREVIOUS NEXT
Tagged: #define #enum #swift
ADD COMMENT
Topic
Name
2+3 =