Type methods in Swift

Methods that are called on the type itself are called type methods. We can access type methods using dot syntax. We have to include the keyword static before the func keyword. When a method is defined inside a class, if the class allows the method to be overridden by a subclass then class keyword has to be included before the func keyword.



Leave a Reply