我正面临这个错误“exc_bad_instruction(code = exc_i386_invop subcode = 0x0)”

问题描述 投票:0回答:1
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
     let cell = Collection_View.dequeueReusableCell(withReuseIdentifier: "list", for: indexPath) as! List_CollectionViewCell
     cell.list_name.text = items[indexPath.row]
     **cell.created_date.text = c_date[indexPath.row]**
     return cell
}

为什么xcode在这一行上产生这个错误?

ios swift xcode collectionview exc-bad-instruction
1个回答
0
投票

当力展开失败时会出现此错误。确保故事板中原型的类在Identity Inspector中设置为List_CollectionViewCell

class

并且其属性检查器中的标识符为"list"

identifier

© www.soinside.com 2019 - 2024. All rights reserved.