ios - UISwipeGestureRecognizer on view - If a touch is inside a UITableViewCell how to pass it to the cell? -


i added uiswipegesturerecognizer view changes content of view depending on direction user swipes(left or right). if user swipes in uitableviewcell though, touch gets ignored , swipe delete feature never shows up. how pass touch uitableviewcell?

what have done:

    [swipeleft setcancelstouchesinview:no];     [swiperight setcancelstouchesinview:no];   -(void)swipeleft:(uiswipegesturerecognizer *)gesture {     bool touchedinsidecell = no;     cgpoint touchedpoint = [gesture locationinview:gesture.view];     (pcfcustomschedulecell *cell in self.tableview.visiblecells) {         cgrect cellframe = cell.frame;         if (cgrectcontainspoint(cellframe, touchedpoint)) {             touchedinsidecell = yes;             break;         }     }     if (touchedinsidecell == no) {             if (recordofday < 5)  {                 recordofday++;                 [self.tableview reloaddata];             }      }else {         //i need pass touch uitableviewcell, swipe delete feature not working     } } 

i have returned yes in caneditrowatindexpath method, , works if refrain added these gesture recognizers. missing?

thanks!

make class delegate of gesture recogniser , can decide if gesture should handle incoming touches.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -