我找到触点的问题。在Objective c中找到触摸点c/cocoa touch
我有一个功能loadView()
其中我设置了16个瓷砖(16 UIImageView
)。
然后在功能:
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
// Retrieve the touch point
UITouch *touch=[[event allTouches]anyObject];
CGPoint point= [touch locationInView:touch.view];
CGRect frame = [self frame]; // Error this Line
}
我已经使用帧识别哪些帧/瓦片使用帧起源按压。
,但此行:
CGRect frame = [self frame];
让我疯了。有人告诉我该怎么做(有解释,为什么不工作)。 PLZ。
你为什么不告诉我们你得到了什么样的错误?同样,告诉我们这个方法在 – newacct 2009-10-01 07:55:08
中是什么类的。是的,你需要提供更多的细节让我们能够解决你的问题。 – 2009-10-01 12:15:01