Introduction

Initializers assign default values to the variables in your class so that they all have initial values when the class is instantiated.

In Swift, there are three types of initializers:

  • Default initializer
  • Designated initializers
  • Convenience initializers

Related Topic