我有一個應用程序,其中主根是一個類似於Facebook或路徑應用程序的行爲的UIViewController,即在左側或右側滑動並顯示另一個視圖。 刷卡以刪除具有奇怪行爲的單元格
但是,我的問題是,有時主UIViewController有UITableViewcells,應該用刷卡消除,但這不能正常工作,有時它檢測到手勢有時不。
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{
return YES;
}
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
[dataItems removeObjectAtIndex:indexPath.row];
[self.tableView reloadData];
}
}
我採用這個庫 enter link description here 使UIViewController的
任何想法的控制器,如何解決這個問題?
在此先感謝。
你是如何實施滑動以揭示側視圖的? – 2012-08-01 15:46:10
使用UIPanGesture。 – DaSilva 2012-08-01 15:47:20
我正在使用這個庫https://github.com/newmarcel/MKDSlideViewController – DaSilva 2012-08-01 15:50:08