Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSam Belcher
3,719 PointsCustom Types
Hi, I am confused with custom types, can someone explain their purpose and their advantage over regular types?
1 Answer
Amazon Web
iOS Development Techdegree Student 4,092 PointsLet's put this on this way, for example you are baking and you have cutter to create heart and star shaped cookies. And one time your friend want a car shape cookies but you don't have cutter for that, so you will create a custom cutter (which in swift this is the custom types).
If regular types or objects can't suffice your requirement, custom types are there to help,.