在迅速4
在迅速4
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {      let row=animals[indexPath.row] 
     let cellIdentifier = "memoCell" 
     var cell=tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as! MemoCellTableViewCell 
     if cell == nil { 
      print("cell is nill") 
      cell = MemoCellTableViewCell(style: .default, reuseIdentifier: cellIdentifier) 
     } 
     cell.name?.text="aaa" 
     cell.address?.text="haha" 
     return cell 
    } 
添加的TableView到AlertController我具有低于错误。
“无法离队与标识符memoCell细胞 - 必须注册标识的笔尖或类或故事板连接原型细胞”
我不知道为什么。 我设置类的故事板没有错误,也可以设置标识正确
我的代码是在github https://github.com/kotran88/iostableviewTest
请帮我得到这个权利
回答:
你必须注册您的厦门国际银行/笔尖在ViewController viewDidLoad方法
let yourCustomNib = UINib(nibName: "MemoCellTableViewCell", bundle: nil)     self.tableView.register(yourCustomNib, forCellReuseIdentifier: "memoCell") 
以上是 在迅速4 的全部内容, 来源链接: utcz.com/qa/264215.html

