【发布时间】:2009-10-01 05:34:02
【问题描述】:
我无法找到接触点。
我有一个函数 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
}
我已使用 frame-origin 来识别按下了哪些框架/图块。
但是这一行:
CGRect frame = [self frame];
让我发疯。请有人告诉我该怎么做。(解释和为什么不工作)。请。
【问题讨论】:
-
你为什么不告诉我们你得到什么样的错误?另外,告诉我们这个方法在哪个类中
-
是的,您需要提供更多详细信息,我们才能解决您的问题。
标签: iphone objective-c uiview uitouch