I am looking for the difference between static and class keyword in swift. Where do i need to use static vs class.
For e.g;
class MyClass {
static func firstMethod() {}
class func secondMethod() {}
}
func doSomething() {
myClass.firstMethod()
myClass.secondMethod()
}
So we can use like this;
MyClass.secondMethod()
MyClass.firstMethod()
So where should i use static or class?