In Class Foo I have a retained property of an NSArray which holds UIViews (which have backgroundColor properties)
In an instance of class Bar I set the NSArray to an array of views, and then set a views background color:
[viewOne setBackgroundColor:[UIColor blueColor]];
NSArray *tempArray = [[NSArray alloc] initWithObjects:viewOne, viewTwo, nil];
[iFoo setArray:tempArray];
[tempArray release];
[viewOne setBackgroundColor:[UIColor redColor]];
[iFoo doSomething];
then in iFoo, the method doSomething is:
NSLog([((UIView*)[self.array objectAtIndex:0]).backgroundColor description]);
which returns the blue color. How can I make it so it returns the red color that was set after the view was added to the view? I think it's something to do with pointers (which I understand, well I did but now I can't remember exactly)?