I think my problem is when gettin the state of myImage as if I simply state
myImage.hidden = YES;
then it hides myImage.
Any suggestions, am I missing something?
To be honest I'm coming from a visual basic background so I could be trying to check the visiblity to completely wrong way!
I think my problem is when gettin the state of myImage as if I simply state
myImage.hidden = YES;
then it hides myImage.
Any suggestions, am I missing something?
To be honest I'm coming from a visual basic background so I could be trying to check the visiblity to completely wrong way!
Thanks for your help!
Sent from my iPhone
You are setting the value already inside of your if-clause! You need to use double equal-signs to check if it is hidden or not, otherwise you are setting it!
myImage.hidden==YES is not the same as myImage.hidden=YES.
Change your code to the following and it should work:
You are setting the value already inside of your if-clause! You need to use double equal-signs to check if it is hidden or not, otherwise you are setting it!
myImage.hidden==YES is not the same as myImage.hidden=YES.
Change your code to the following and it should work:
Personally, I think this is one of the stupidest things about C. Anybody who uses the if (a = b) syntax should be shot for being too cute.
Show me a C programmer who has not wasted many, many hours in his/her career hunting down bugs, only to find that he or she accidentally used an "=" (assignment) instead of an "==" comparison, and I'll show you a programmer who hasn't been programming in C for very long.
This usage should be flagged with a warning by the compiler.