I have a NSMutableArray is my delegate that I am using in one of my view controllers as well.
So in viewDidLoad I make a mutable copy of my NSMutableArray like this
@implementation ItemsViewController{
AppDelegate *mydelegate;
NSMutableArray* allItems;
}
In viewDidLoad
allItems = [mydelegate.array mutableCopy];
Now whatever changes I make in my allItems MutableArray also cause changes in my mydelegate.array. Am I doing something wrong?
Also my array in the delegate is defined as follows
@property (nonatomic, strong) NSMutableArray *array;