I want to show you an example of one of my header files and get your suggestions on what I could do better giving the situations below.
ARC is enabled
@property (nonatomic, assign) int some_simple_value;
@property (nonatomic, strong) NSMutableArray *someArray;
@property (nonatomic, weak) IBOutlet UIButton *someButton;
@property (nonatomic, copy) NSMutableArray *someArrayCopy
@property BOOL some_bool;
I understand what a lot of the types mean, but I don't know why I would use a given one instead of another in some cases. Also, if I know my object is only accessed by one class, should I not use nonatomic
(because there's no worry of multiple threads accessing it, right?)
ANSWER
These answers helped me drastically:
What's the difference between the atomic and nonatomic attributes?
and
Objective-C declared @property attributes (nonatomic, copy, strong, weak)