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

How do I browse the contents of a Google Cloud Storage bucket I don't own?

google-cloud-storage google-cloud-platform

The storage browser accessible by clicking Storage > Cloud Storage > Browser from the Google Developers Console is a really convenient way to browse the contents of my buckets. However it only

How to Add Air Native Extension to Stage

android actionscript-3 flex air air-native-extension

I need to display an Activity written in Java using the Android SDK in my Flex Mobile app. I've seen it done with Map ANEs, but cannot find any example code or anything of the sort. I've already cr...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.