Talk is cheap, show me the code!

Hi, I'mBhavik Thummar

iOS Developer & Designer

Download Resume

Swift – Class and Static Methods

Both the static and class methods can only be accessed with the class as they are not Instance methods.

The only difference between static and class methods is, Class methods can be overridden but not static methods. Overriding static methods will result in a compile-time error.

Note: Structures can have static methods, They cannot have class methods.
Hope this post is useful. Feel free to comment in case of any queries.
  • Share this :

Leave a comment