searchDisplayControllerを使用しUITableViewの検索結果を長押し(UILongPressGestureRecognizer)した際にうまくIndexPathが取得出来ず。
試行錯誤してようやく解決したので個人的メモ
[objc]
CGPoint point;
NSIndexPath *indexPath;
if(self.searchDisplayController.active){
point = [gestureRecognizer locationInView:self.searchDisplayController.searchResultsTableView];
indexPath = [self.searchDisplayController.searchResultsTableView indexPathForRowAtPoint:point];
} else {
point = [gestureRecognizer locationInView:_tableView];
indexPath = [_tableView indexPathForRowAtPoint:point];
}
[/objc]
searchDisplayController + UITableView + UILongPressGestureRecognizer

コメント