私はtableviewCell、ユーザーがscroll水平にできる場所を持っています。scrollViewは のほぼ全体cellをカバーしているため、ユーザーが をクリックしてもtableViewメソッドは呼び出されません。didSelectRowcell
だから私は、のタッチイベントをに渡すことができると思ったUIScrollViewがcell、それでもdidSelectRow呼び出されない。UIScrollViewタッチがドラッグでない場合にのみ、タッチ イベントを渡すようにサブクラス化しました。
- (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event
{
NSLog(@"touch scroll");
// If not dragging, send event to next responder
if (!self.dragging)
[self.superview touchesEnded: touches withEvent:event];
else
[super touchesEnded: touches withEvent: event];
}
クリックをテーブルに渡し、デリゲートメソッドを呼び出してスクロールを保持する方法についてのアイデアはありますscrollviewか?