Created
May 25, 2017 15:30
-
-
Save izotx/fca648a578f6e1a351e82623bf748338 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
} | |
} | |
//Usage | |
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