Skip to content

Glossary: Swift Basics

initializer

Also written: init, initializers

The code that sets up a new instance. Your own `init` replaces the memberwise one and must give every stored property a value.

Where the book teaches it

Related terms

memberwise initializerinstancestruct