I have a UIImageView based class (lets call it classA) that uses a classB and was declared something like that...
@interface classA : UIImageView {
@public classB *mylabel;
}
@property (nonatomic, retain) classB *mylabel;
... @synthesize myLabel was put on its .m
class B was declared something like
@interface classB : UILabel {
@public UILabel *myCustomlabel;
}
@property (nonatomic, retain) classB *myCustomlabel;
... @synthesize myCustomlabel was put on its .m
now I am on the main code. I create an object like this
classA *myObject = [[classA alloc] init];
myObject.myLabel.myCustomLabel.text = @"Hi there";
// this last line fails. It says there's not myCustomLabel structure on myLabel!!!
why is this happening if everything is public?
thanks