I have NSMutableArray containing UIImageViews and NSArray containing UIImages. The arrays are of equal size. I need to set images from the second array to the first one. It would be very convinient to implement it in loop, something like:
for (int i = 0;i < firstArray.count;i++)
[firstArray objectAtIndex:i].image = [secondArray objectAtIndex:i];
but that doesn’t compile. It says “Property “image” not found on object of type “id”. Is it possible to implement it in loop somehow?
You need to cast from the
idtype to aUIImageViewbefore accessing properties on it. Use the following…