2016-03-21 6 views
0

私の問題は、touchesBegan、touchesMovedとtouchesEndedはのフォーカスを取っているということです。だからdidSelectWithTableViewは決して呼び出されません...TouchesBegan、touchesMovedおよびtouchesEndedをparentViewではなくサブビューで呼び出すことはできますか?テーブルビューのクリックで</p> <pre><code>- (void)didSelectWithTableView:(UITableView *)tableView controller:(UIViewController *)controller { ... } </code></pre> <p>:

touchesBegan、touchesMovedおよびtouchesEndedでは処理されるが、親のViewでは処理されないサブビューを持つことは可能ですか?

答えて

0

メソッドのスーパー実装を呼び出すだけです。あなたの上書きコードと一緒に。

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
{ 
    [super touchesBegan:touches withEvent:event]; 
    ... 
} 

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { 
    [super touchesMoved:touches withEvent:event]; 
    ... 
} 

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { 
    [super touchesEnded:touches withEvent:event]; 
    ... 
} 
+0

Thx dude、それがポイントです。今私の次の問題は、もしあなたが私がそのチケットにいるのを助けることができる... http://stackoverflow.com/questions/36135820/is-it-possible-to-draw-in-a-popover-appearing-by-clicking -in-a-tableviewcell私はこの3つのメソッド(touchebegan、移動し、終了した)をポップオーバーであるsubViewに入れようとします... – Claudio

関連する問題