Hi Everyone:
I am looking for a way to store references to variables inside a NSMutableArray. As variables are going to be created dynamically based upon what the user has chosen, I want to be able to simply sort through this array and get references to these created variables. In case it matters, I am creating a iPhone project. However, when I attempt to do this using the following code:
for (int a = 0; a < 10; a++)
{
UIView *tempView;
[listingOfViews addObject:tempView];
}
for (int a = 0; a < [listingOfViews count]; a++)
{
[listingOfViews objectAtIndex:a] = defaultViewStructure;
}
It gives me this error: "error: lvalue required as left operand of assignment"
Any ideas?
EDIT: Also, I get this error: "error: request for member 'size' in something not a structure or union"
When I attempt to do
for (int a = 0; a < [listingOfViews count]; a++)
{
[listingOfViews objectAtIndex:a].size.height = ...
}