在这个代码我加上程序上的VC:出队可重复使用的电池老是死机
@IBAction func addPerson(_ sender: UIBarButtonItem) {
let controller = CNContactPickerViewController()
controller.delegate = self
navigationController?.present(controller, animated: true, completion: nil)
}
这里我使用去另一个VC当我在接触点击(显示信息进入细胞,然后我想使对于手机/电子邮件复选框,显示早在我的第一个VC)
func contactPicker(_ picker: CNContactPickerViewController, didSelect contact: CNContact) {
let vc = EditContactViewController()
self.navigationController?.pushViewController(vc, animated: true)
我创建了一个类下一个单元格和我成立了标识为故事板 细胞时,我这样做是的tableView的cellForRowAtIndexPath
let cell = tableView.dequeueReusableCell(withIdentifier: "cell") as? ConfigCell
return cell!
这给了我:
fatal error: unexpectedly found nil while unwrapping an Optional value
我也尝试withIdentifier,forIndexPath和它说:
二○一六年十一月一十二日01:35:28.626 iEvents3 [2637:47714] ** *终止应用到期应用 未捕获异常'NSInternalInconsistencyException',原因: '无法使带标识符单元的单元出列 - 必须注册一个笔尖 或标识符的类或连接 故事板'
我删除了重用标识符并将其重新放回,清理应用程序,重新启动一切。
谢谢你的时间!
我解决了这个问题: 设V = self.storyboard .instantiateViewController(withIdentifier: “帮助”)? self.navigationController .pushViewController(V!动画:真) 在故事板,我把故事板标识符包括v控制器“帮助” –