Accessing a type method with Swift

Jul 30, 2014 00:00 · 44 words · 1 minute read swift

Accessing a type method is different from accessing an instance method.

If you want to say

Foo.bar()

You’ll need to say this if you’re in a struct

static func bar() {
}

or this if you’re in a class.

class func bar() {
}