(newbie Q, asking after a full day research)
Kindly help, where am I going wrong :
I can set an UIImageView property successfully from viewDidLoad : [TodayMark setHidden:YES];
But it does not work when I put it in aother instance method (in the same class) and call that method from viewDidLoad.
The method itself is getting called fine but only the property does not get set and I get no error or warning !
-(void)viewDidLoad {
...
[TodayMark setHidden:NO]; // This is working fine
//calling the instance method
myClass *test = [[myClass alloc] init];
[test WeekName];
}
-(void)WeekName{
NSLog(@"---test call---"); // getting printed in the consol
[TodayMark setHidden:YES];
}
Use
self, and you do not need toalloc/inita new instance there, just useselfand everything will be groovy.And…