- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {// A case was selected, so push into the CaseDetailViewControllerUITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];if (cell.selectionStyle != UITableViewCellSelectionStyleNone) {// Handle tap code here}}
Below snippet disable highlighting and it doesn't disable the call to didSelectRowAtIndexPath. Set the selection style of cell to None in cellForRowAtIndexPath
import Foundation
class CustomTableViewCell: UITableViewCell{required init(coder aDecoder: NSCoder){fatalError("init(coder:) has not been implemented")}
override init(style: UITableViewCellStyle, reuseIdentifier: String?){super.init(style: style, reuseIdentifier: reuseIdentifier)self.selectionStyle = UITableViewCellSelectionStyle.None}}