I get the error (Lvalue required as left operand of assignment) for this code:
[[addAlertViewController alertsArray] = [NSMutableArray arrayWithObjects:nil] retain];
How can I fix it?
The appropriate Code is as follows:
[addAlertViewController setAlertsArray:[NSMutableArray arrayWithObjects:nil]];
Be careful that you have declared in your @interface
of addAlertViewController
's Class:
@property (nonatomic, retain) NSMutableArray *alertsArray;
And in your implementation file
@synthesize alertsArray;