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 trial

iOS Swift Enums and Structs Structs and their Methods Review Structs

Structs and their uses

Please is there anyone who can clearify why do i need struct or enums instead of funtions and how they become handy while building your app? Thank You

2 Answers

Hello Abba,

Funny you should ask. I was just brushing up on this myself yesterday.

Check out this blog post by treehouse

Enum: If you are a web developer then the easiest way to think of an enum is anywhere you would use a dropdown. A dropdown consists of a limited set of values from which you can choose one. - Treehouse Blog

Struct: A struct allows you to create a structured data type which provides storage of data using properties and extending its functionality via methods. - Treehouse Blog

Thank You.. This will get me on the way :)