Swift UITableView didSelectRowAtIndexPath not getting called

前端 未结 10 2015
野的像风
野的像风 2021-02-06 23:18

New to IOS development and am having trouble with handling cell selection on a table. Whenever I select, the method is not getting called below - any idea why?

My proje

10条回答
  •  余生分开走
    2021-02-07 00:15

    Another reason you may write this function which allowed to click under condition

    func tableView(_ tableView: UITableView, shouldHighlightRowAt indexPath: IndexPath) -> Bool {
        if(indexPath.section == 1){
            return true
        }
        return false
    }
    

提交回复
热议问题