CNUI ERROR Contact view delayed appearance timed out

情到浓时终转凉″ 提交于 2019-12-12 07:45:02

问题


I am trying to show the Contacts add new contact view with the ContactsUI framework in iOS 10. The code that I am using to present CNContactViewController the is the following:

    let contactViewController = CNContactViewController(forNewContact: contact)
    contactViewController.contactStore = CNContactStore()
    contactViewController.delegate = self

    self.present(contactViewController, animated: false) {}

But every time I execute the code the app gets frozen and I get three + times the following error log: [CNUI ERROR] Contact view delayed appearance timed out

Any explanation is welcome,


回答1:


I find a workaround. Just wrap your CNContactViewController in UINavigationController and all will be fine.

Special code sample for @JackRobson

let contactViewController = CNContactViewController(forNewContact: contact)
contactViewController.contactStore = CNContactStore()
contactViewController.delegate = self
let navigationController = UINavigationController(rootViewController: contactViewController)
self.present(navigationController, animated: false) {}


来源:https://stackoverflow.com/questions/38748969/cnui-error-contact-view-delayed-appearance-timed-out

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!