UITableView didSelectRowAtIndexPath sometimes called after second tap

前端 未结 2 764
傲寒
傲寒 2020-12-19 01:58

I\'m facing a curious UITableView behaviour and i don\'t know where this is coming from. I\'m building a very simple single view IOS8 Swift application with a f

2条回答
  •  囚心锁ツ
    2020-12-19 02:22

    Try this.

    func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
      dispatch_async(dispatch_get_main_queue(), {
        self.performSegueWithIdentifier("homeToDetail", sender:self)
      })
    }
    

    This is a bug in iOS 8, I think. UITableViewCell selection Storyboard segue is slow - double tapping works though

提交回复
热议问题