Skip to content

Instantly share code, notes, and snippets.

@JarvisTheAvenger
Created August 7, 2021 05:05
Show Gist options
  • Save JarvisTheAvenger/246ee8939c171d12346337e30f6c5cd7 to your computer and use it in GitHub Desktop.
Save JarvisTheAvenger/246ee8939c171d12346337e30f6c5cd7 to your computer and use it in GitHub Desktop.
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