2016-03-21 11 views
0

Benim sorunum touchesBegan, touchesMoved ve touchesEnded odağını alıyor olmasıdır. Bu yüzdenSelectWithTableView hiç çağrılmadı ...TouViewBegan'ı çağırmak mümkün mü, SubView'da dokunur ve dokunur, parentView'de değil mi? Bir tableview tıklamayla</p> <pre><code>- (void)didSelectWithTableView:(UITableView *)tableView controller:(UIViewController *)controller { ... } </code></pre> <p>:

Alt görünüm (popover olarak) touchesBegan tarafından işlenebiliyor mu, dokunma ve dokunmalarEnded, ancak ana görünüm değil mi?

cevap

0

Sadece yöntemlerin süper uygulanmasını çağırın. Geçersiz kılma kodunuzla birlikte.

- (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, işte nokta bu. Şimdi bir sonraki problemim, eğer bana yardım edebilirseniz o bilette ... http://stackoverflow.com/questions/36135820/is-it-possible-to-draw-in-a-popover-appearing-by-clicking -in-a-tableviewcell Ben bir popover olan subView bu üç yöntem (touchebegan, taşındı ve sona erdi) denemek için ... – Claudio

İlgili konular