April 2017
Intermediate to advanced
316 pages
9h 33m
English
Methods are functions that are associated with a particular type. Instance methods are functions that are called on an instance of a particular type. Type methods are functions that are called on the type itself.
The following example presents a class containing a type method that is named someTypeMethod():
class AClass { class func someTypeMethod() { // type method body } } // We can call this method as follows: AClass.someTypeMethod()
Read now
Unlock full access