Reputation: 432
(a)@property(nonatomic,copy) NSString *str1;
(b)@property(nonatomic,strong) NSString *str1;
How swift compiler identifies the variable is a copy or strong as both the string will be converted to same.
var str1 = "" .
Upvotes: 0
Views: 94
Reputation: 4013
Swift doesn't care if it's "copy" or "strong".
It will call the selector setStr1(...)
in the objective C class and the objective C implementation will decide if a copy or retain should be done.
Upvotes: 1