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 trialNehemiah Reese
17,692 PointsWhere did the method setBlogPostURL come from? Does every custom class come with the set"####" method for its properties
Having trouble understanding where he got the setBlogPostURL method from. Realized it didn't autocomplete for him
1 Answer
Robert Baghai
5,492 PointsI'm sure you know the answer to your question by now. But yes, by creating a property (depending on the attributes like readonly, readwrite, nonatomic, etc) Xcode will automatically generate a getter and setter method for you behind the scenes. This is assuming of course that your attributes allow this. Something like (nonatomic, strong) will always have a getter and setter method made for you.