Reputation: 9596
What is the difference between these two declarations in Objective-C?
I have been looking at some Apple source code example and they used the second one in various circumstances. I just wanted to understand why and when is best to use the second version rather than the first one (I know the difference between strong, weak, atomic, nonatomic).
@property(nonatomic, strong) NSObject * myObject;
// vs
@property NSObject * myObject2; //No additional qualifiers
Upvotes: 1
Views: 383
Reputation: 1965
@property NSObject * myObject2
// is same as
@property (atomic,strong) NSObject * myObject2
which one to use, is developer's personal choice
Upvotes: 5