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
Taylor Smith
iOS Development Techdegree Graduate 14,153 Pointstype methods?
I'm trying to understand when and how to use a type method. I've searched documentation and tutorial online...but I still don't understand when I'm suppose to use it. can someone explain it as if you were talking to a 5 year old? haha
2 Answers
Allen Soberano
13,634 PointsType Methods are methods that are called on an instance of a particular type instead of on an instance of an object.
Example: Pokemon types: water, fire, grass etc..
Water Pokémons: Squirtil, Magicarp, Graydos, etc.....
Rather than changing an instance/specific Pokémon object, you could change all the water types.
Taylor Smith
iOS Development Techdegree Graduate 14,153 Pointsthat explanation actually helps a lot. thank you!
Allen Soberano
13,634 Pointsglad i could help