2017-04-07 31 views
1

我是Swift的新手,也沒有開發背景經驗。我想在Swift中使用簡單的表格視圖,但在源文件中不斷收到編輯器佔位符錯誤。編輯器佔位符在簡單的UITableView源文件錯誤

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 
    let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: <#T##IndexPath#>) as! CustomCell 

    cell.photo.image = images[indexPath.row] 
    cell.Name.text = names[indexPath.row] 
    cell.Job.text = jobs[indexPath.row] 

    return cell 
} 

回答

1

這是你的問題是:

for: <#T##IndexPath#>) 

只是標籤,該變量並鍵入:

indexPath 
+0

乾杯我認爲它只是它的方式複製和粘貼! let cell = tableView.dequeueReusableCell(withIdentifier:「cell」,for:IndexPath)as! CustomCell –

+0

這是我得到錯誤的線!!! –

+0

indexPath,而不是IndexPath – Mozahler