愚蠢的问题,但你可以通过任何touchesEnded。我想把UIImageView片传给它。我是新手。我知道NSSet是NSObject的子类,所以我认为有一种方法可以通过NSSet以某种方式传递我的UIImageView。
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
if (!isTouchingEmptyField) {
[UIView beginAnimations:nil context:nil];
piece.center = CGPointMake(48, 366);
[UIView commitAnimations];
}
}
答案 0 :(得分:0)
你可以这样做,但我不会。
我会在你想要使用选择器添加行为的特定UIViews上使用UIGestureRecognizer来执行该操作。