Enumerations
Last updated
What is Enumerations?
Enumerations, often shortened to enums, are a way to define a group of related values under a common type. They essentially let you create your own custom data types where the possible values are explicitly defined. This makes your code more readable and safer by restricting the values a variable can hold to only those you've specified in the enum.
Free resources to learn Enumerations
- Official docsEnumerations
- VideoIntroduction to Swift: Enumerations
Enumerations: common questions
Can I learn Enumerations in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Enumerations in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Enumerations tutorial for beginners?
It is lesson 45 of 156 in the free Swift & Swift UI roadmap, in stage 20, Enumerations. If you are new to Swift & Swift UI, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.