这是个愚蠢的问题,但是你能传递任何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];
}
}发布于 2012-02-17 13:37:07
你可以这么做,但我不会。
我会在您想要添加行为的特定UIViews上使用一个UIGestureRecognizer,并使用一个选择器来执行该操作。
https://stackoverflow.com/questions/9323121
复制相似问题