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 trialTeri Dent
11,515 PointsClarification on the meaning of computed properties
Pasan uses a computed property to return an instance of UIImage in the Story extension. Since there is no actual computation occurring, I was wondering if this might be a semantic misunderstanding.
Is the switch statement used in the extension considered a computed property because it does not store any information?
Thanks for your time.
1 Answer
Ian Billings
Courses Plus Student 7,494 PointsHi Teri,
You have pretty much answered it. A 'standard' property is stored in memory as part of the object. A computed property is not stored in memory, but is called upon as needed by the application.
Hope that helps
Ian