in this code i add the programatic VC:
@IBAction func addPerson(_ sender: UIBarButtonItem) {
let controller = CNContactPickerViewController()
controller.delegate = self
navigationController?.present(controller, animated: true, completion: nil)
}
here i use to go on another VC when i click on a contact (to show info into cells and then i want to make a checkbox for phones/emails to show back in my first VC)
func contactPicker(_ picker: CNContactPickerViewController, didSelect contact: CNContact) {
let vc = EditContactViewController()
self.navigationController?.pushViewController(vc, animated: true)
i created a class for the next cell and i set up identifier as cell in storyboard when i do this in tableView cellForRowAtIndexPath
let cell = tableView.dequeueReusableCell(withIdentifier: "cell") as? ConfigCell
return cell!
this gives me:
fatal error: unexpectedly found nil while unwrapping an Optional value
i also tried withIdentifier,forIndexPath and it says:
2016-11-12 01:35:28.626 iEvents3[2637:47714] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
i deleted reuse identifier and put it back again , cleaned the application, restart, everything.
Thank You for your time!