私は電話の連絡先を取得するために取り組んでいます。しかし、私はのようなエラーがあります。宣言されていないタイプの使用ContactsTableViewCell
私はUITableViewCell
を試しましたが、うまくいきませんでした。私は何をすべきか ?未申告のタイプ 'ContactsTableViewCell'の使用
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
{
let cell = tableView.dequeueReusableCell(withIdentifier: "TableCell", for: indexPath) as! ContactsTableViewCell
let data = dataArray![indexPath.row] as! Data;
cell.lblName.text = data.name
cell.imgContact.image = data.image
return cell
}
ContactsTableViewCellのクラスを作成しましたか? –
あなたのモジュールのどこかに 'class ContactsTableViewCell {...}'がなければなりません。そして、 'Data'はSwift 3の予約語です。それをカスタム構造体/クラスとして使用しないでください。 – vadian
コピー&ペーストエラー? – vikingosegundo