Need to stay clicked on row to select it

I have an issue with my UITableView.

The method "didSelectRowAtIndexPath" is not called until I stay clicked on the row for 2 seconds minimum. If I just click one time on the cell like a normal person would do to select it, nothing happens : didSelectRowAtIndexPath isn't called.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CellWithSelection" forIndexPath:indexPath];

    NSDictionary *player = _objects[indexPath.row];
    cell.textLabel.attributedText = [TCUtilities defaultAttributedStringWithString:[player objectForKey:@"personalName"] AndSize:DEFAULT_SIZE AndColor:DEFAULT_TEXT_COLOR];
    cell.textLabel.textAlignment = NSTextAlignmentCenter;

    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    [cell setBackgroundColor:[UIColor grayColor]];
    [cell setAccessoryType:UITableViewCellAccessoryCheckmark];
}

- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    [cell setBackgroundColor:[UIColor clearColor]];
    [cell setAccessoryType:UITableViewCellAccessoryNone];
}

Answers


Fixed thanks to zbMax. I had a gesture recognizer implemented in my viewDidLoad method.


Need Your Help

tStringList passing in C# to Delphi DLL

c# delphi dll tstringlist

I have a Delphi DLL with a function defined as:

Why is my Jersey JAX-RS server throwing a IllegalStateException about not being in RequestScope?

java jersey jax-rs

I've been looking at this one for too long and found the solution and wanted to provide feedback for any other intrepid JAX-RS adventurers that follow.