我的項目基於scrollview中的觸摸事件。即時通訊使用下面的代碼,但它顯示一個錯誤。手勢未申報。如何聲明的手勢,請告訴我,滾動視圖中的觸摸動作
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGestureCaptured:)];
[scrollView addGestureRecognizer:singleTap];
- (void)singleTapGestureCaptured:(UITapGestureRecognizer *)touch
{
CGPoint touchPoint=[gesture locationInView:scrollView];
}
'[gesture locationInView:scrollView];'? – Ilanchezhian