У меня есть UITableView как подпредставление в представлении UIViewController. Я понимаю, что могу обнаружить событие касания, переписав
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesEnded:touches withEvent:event];
}
-(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesCancelled:touches withEvent:event];
}
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];
}
Но он никогда не обнаруживал эти события в ViewController
, если я коснулся tableview
. Как предлагали другие участники форума, у меня должен был быть пользовательский UITableView
, и я добавил в него вышеупомянутые строки. Я сделал это, но все равно viewController
не обнаружил событие касания. Какие-либо предложения? Спасибо.