Swift - Methods in Classes

Introduction

In Swift, you define methods just like how you define functions.

There are two types of methods in Swift:

  • Instance methods: Belong to a particular instance of a class
  • Type methods: Belong to the class

Related Topics