【发布时间】:2011-06-09 21:25:09
【问题描述】:
我试图在多点触控中找到两个触控的坐标。此代码在“UITouch *touch2 = ...”行上抛出一个 SIGABRT。谁能告诉我哪里出错了?
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
NSArray *touchArray = [touches allObjects];
UITouch *touch1 = [touchArray objectAtIndex:0];
UITouch *touch2 = [touchArray objectAtIndex:1];
CGPoint firstTouch = [touch1 locationInView:self.view];
CGPoint secondTouch = [touch2 locationInView:self.view];
}
【问题讨论】:
标签: iphone cocoa-touch multi-touch