Expression resolves to an unused property

后端 未结 1 1446
Happy的楠姐
Happy的楠姐 2021-01-29 07:35
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if segue.identifier == \"toDetails\" {
        if let indexPath = sender as? IndexPath {
                 


        
1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-29 08:20

    Expression resolves to an unused property

    This error means, that you wrote code with reference for some property of some item in jobs array, but you haven't done anything with it (declare some constant, change some variable, etc.)

    You probably just wanted to declare Job item for specific row, so you can do it like this

    let job = jobs[indexPath.row]
    

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