Manually call didSelectRowatIndexPath

前端 未结 5 1332

I am trying to call didSelectRowAtIndexPath programmatically but am having trouble.

[self tableView:playListTbl didSelectRowAtIndexPath:indexPath];
         


        
5条回答
  •  时光取名叫无心
    2020-12-14 17:35

    Swift 3.0 Solution

    Manually call didSelectRowAtIndexPath

    let indexPath = IndexPath(row: 7, section: 0)
    tblView.selectRow(at: indexPath, animated: true)
    tblView.delegate?.tableView!(tblView, didSelectRowAt: indexPath)
    

提交回复
热议问题