0
0

【Swift】【R.swift】※注意 identifierをつけましょうね

Posted at

目次

1.R.swiftの変数部分でセルが呼び出せない
2.解決方法

1. R.swiftの変数部分でセルが呼び出せない

R.swiftを導入しているのに、なぜかR.swiftの変数を呼び出す部分で怒られる

 tableView.register(R.nib.XXXcell)

発生したエラー

No exact matches in call to instance method 'register'

うーん、、、tableViewはregisterメソッド持っているけどな〜
間違っていたのはR.swift部分でした。

2. 解決方法

xibファイルのidentifer(アイデンティファー)を設定していませんでした。
→どうやらR.Swiftはこのidentiferを使って変数を定義しているみたい。
スクリーンショット 2024-01-23 9.49.52.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0