画面に設定されたUITapGestureRecognizerでxとyを取得しました。オブジェクトが接触している場所を取得した後、条件を設定しましたが、機能しません。たぶん私はObjectiveCに間違った条件を入れましたか?Xcodeはエラーを出しませんが、関数は機能しません。
-(void)tappedMapOniPad:(int)x andy:(int)y{
NSLog(@"the x is: %d", x);
//the x is: 302
NSLog(@"the y is: %d", y);
//the y is: 37
if((121<x<=181) && (8<y<=51)){ //the error is here
self.stand = 431;
}else if ((181<x<=257) && (8<y<=51)){
self.stand=430;
}else if ((257<x<=330) && (8<y<=51)){
self.stand = 429;
}
NSLog(@"The stand is %d", self.stand);
//The stand is 431
}
どのようにできるのか?