Created
August 7, 2021 05:05
-
-
Save JarvisTheAvenger/246ee8939c171d12346337e30f6c5cd7 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 Foundation | |
// Class vs Static | |
class A { | |
class func doSomething() { | |
print("do something") | |
} | |
// Static functions can't be overridden | |
static func createSomething() { | |
print("create something") | |
} | |
} | |
class B : A { | |
override class func doSomething() { | |
print("doing something") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment