Skip to content

Instantly share code, notes, and snippets.

@asilturk
Last active April 29, 2019 11:25
Show Gist options
  • Save asilturk/d35c87f1c3c0b773bf1bc04aa94b19b0 to your computer and use it in GitHub Desktop.
Save asilturk/d35c87f1c3c0b773bf1bc04aa94b19b0 to your computer and use it in GitHub Desktop.
tutorial_StaticClassVariable.swift
class Person {
// static var count = 120
static var count: Int {
return 120
}
class var averageCount: Double {
return 23.6
}
}
class Personnel: Person {
// Static property override edilemez. ⚠
// override static var count: Int {
// return 150
// }
override class var averageCount: Double {
return 19.5
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment