TIL difference between `class` and `static` members in Swift; what is redacted view
Watched Point Free episode #115 █████ed SwiftUI: The Problem. Very interesting. Now I know what is redacted view.
Today I was asked about class
and static
members in Swift and the difference. I didn’t know about the difference. That why I checked that after interview. What’s the difference between a static
variable and a class
variable?:
Where
static
andclass
differ is how they support inheritance: When you make astatic
property it becomes owned by the class and cannot be changed by subclasses, whereas when you use class it may be overridden if needed.