Skip to content

Instantly share code, notes, and snippets.

@brockboland
Created May 23, 2017 16:17
Show Gist options
  • Save brockboland/d5f001d5f7b6f67c5030652cc6ace370 to your computer and use it in GitHub Desktop.
Save brockboland/d5f001d5f7b6f67c5030652cc6ace370 to your computer and use it in GitHub Desktop.
Instance method reference on class
import UIKit
class Foo {
private let someID: String
init() {
self.someID = UUID().uuidString
}
func getID() -> String {
return someID
}
}
let str = "Function? \(Foo.getID(Foo()))"
let otherStr = "Value! \(Foo.getID(Foo())())"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment