How to declare static constant in class scope? such as
class let Constant: Double = 3.1415926
// I know that in class we use class modifier instead of static.
How to declare static constant in class scope? such as
class let Constant: Double = 3.1415926
// I know that in class we use class modifier instead of static.
Swift supports static type properties, including on classes, as of Swift 1.2:
If you need to have a class variable that is overridable in a subclass, you'll need to use a computed class property: