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
Consequences of using just nonatomic instead of using nonatomic, weak for IBOutlet properties in iOS
What are the consequences of using the following declaration
@property (nonatomic) IBOutlet UILabel *imageTitle;
instead of using nonatomic, weak as follows :
@property (nonatomic, weak) IBOutlet UILabel *imageTitle;
in the property declaration in Objective-C (iOS 8 and higher, Xcode 6 and higher)
Previously, we had to explicitly use the weak keyword and corresponding strong keyword for controllers and delegates but it seems in your tutorials, you do not use the strong and weak keywords in your property declarations.
What is the difference and what are the consequences of not putting in the strong and weak keywords?