@interface ChargeView (){
NSString* billid;
int clickRow;
NSMutableArray *arr1;
}
@property (nonatomic, strong) NSMutableArray *arr2;
What's the difference between arr1 and arr2? Which is better or write it anywhere if I like?
@interface ChargeView (){
NSString* billid;
int clickRow;
NSMutableArray *arr1;
}
@property (nonatomic, strong) NSMutableArray *arr2;
What's the difference between arr1 and arr2? Which is better or write it anywhere if I like?
The property also generates the accessors -(NSMutableArray *)arr2
(getter) and -(void)setArr2:(NSMutableArray *)arr2
(setter). It further generates a corresponding instance variable _arr2
(the underscore is convention for ivars). The attributes of the property determine the behavior of the accessors. For instance, if the property is marked atomic
, the accessors will synchronize access to the ivar.
On the other hand, arr1
is just an ivar and you have to write accessors (if you need any) yourself.