Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import UIKit
class DataSource{
//Static method - no need to initialize the instance of the class
class func locations()->[String]{
let a = "a"
let b = "b"
return [a,b]
let locations = DataSource.locations()
//notice that we don't have to create an instance: let d = DataSource()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.