2

我演示时导航控制器没有出现CNContactViewController.init(forNewContact: CNContact)。下面的代码适用于早期的 xcode 8 beta。但不适用于 xcode 8 beta 6 和 GM。

    let a = CNContact()
    let contactPickerViewController = CNContactViewController.init(forNewContact: a) // iOS Editor
    contactPickerViewController.delegate = self

    let nav = UINavigationController.init(rootViewController: contactPickerViewController)
    present(nav, animated: true, completion: nil)

我尝试将导航控制器栏隐藏为 false,但仍然没有出现。

nav.setNavigationBarHidden(false, animated: true)

4

0 回答 0