I have an array of objects and I can print them out, so I know they are present.
The problem I have is that I cannot access the variables of the objects.
e.g.
// This prints out correctly
NSLog(@"asset frame in select mode is at index:%d is %@", i, [[AssetsSingleton sharedMySingleton].assetFrames objectAtIndex:i]);
This print outs
asset frame in select mode is at index:0 is
Asset: 0x8087040; frame = (4 2; 75 75); layer = CALayer: 0x808bd00>>
I have the member variables for an Asset as follows
UIImageView *overlayView;
BOOL selected;
id parent;
The problem is I cannot access these e.g. overlayView using
[[AssetsSingleton sharedMySingleton].assetFrames objectAtIndex:i].overlayView.hidden = TRUE;
How can I access these members? The print out seems to be showing that the array holds an Asset.
Either cast or assign the object to a variable before using its properties:
Or:
Properties are only available to you when the compiler knows the type of the object.