i am having some simple problem in objective c maybe you can help .
i have 2 strings that get their value like that :
triger = [NSMutableArray arrayWithObjects:[NSString stringWithFormat: @"%f", x],
[NSString stringWithFormat: @"%f", y],
nil];
X = [triger objectAtIndex:0]; // coordinates
Y = [triger objectAtIndex:1];
NSLog(@"%@", Y);
NSLog(@"%@", X);
if (Y == @"0" && X == @"0") // TOUCH TRIGER
now the NSLog is show me the value y=0 and x=1, AND THE IF STATEMENT IS ALWAYS DONE..
why is that ?? what am i doing wrong ?
thanks . . . . . .
I think you need to change your if statement to this: