iphone - didSelectRowAtIndexPath: only being called after long press on custom cell

前端 未结 7 1687
北恋
北恋 2020-12-09 08:07

I am creating one table view based application. I have created a custom table cell for table, that contains 2 labels, 1 image and 1 button. The table view Data source metho

相关标签:
7条回答
  • 2020-12-09 08:35

    Maybe you will call the method

    [tableView deselectRowAtIndexPath:indexPath animated:NO];

    before Push ViewController or Other Operation. Like

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
        // 1. manual call this method to deSelect Other Cell
        [tableView deselectRowAtIndexPath:indexPath animated:NO];
    
        // 2. than do other operation
        PushViewController Or Some Animation ....
    }
    

    that`s solve my problem .

    0 讨论(0)
提交回复
热议问题