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!
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
Rycardo C4,599 Points
Question for Amit re Events project
Hey Amit, I was having a lot of problems with this project. I'll spare you the details, but I only found the error by comparing my typed files to the download project files. My mistake was when creating the Event properties. Can you please explain when to and why to use "copy" instead of "strong"? Specifically I'm talking about these lines: @property (nonatomic, copy) NSString *title; @property (nonatomic, copy) NSDate *startTime; @property (nonatomic, copy) NSString *venueName;
Amit BijlaniTreehouse Guest Teacher
In the events project you are downloading and parsing an XML file. As you parsing the XML file you are storing the value of each element in a temporary variable. That temporary variable needs to then "copied" to the individual properties of the Event object. If you don't "copy" the value then you are holding on to the existing value in the temporary variable which is what strong does.