1
votes

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 
1

1 Answers

5
votes
@property NSObject * myObject2

// is same as
@property (atomic,strong) NSObject * myObject2 

which one to use, is developer's personal choice