此代码折叠我的所有uiviewcontroller层次结构
func openVCard(for cnContact: CNContact) {
let contactViewController = CNContactViewController(forUnknownContact: cnContact)
contactViewController.contactStore = CNContactStore()
contactViewController.delegate = self
let navigationController = UINavigationController(rootViewController: contactViewController)
let doneButton = UIBarButtonItem(title: "Close", style: .done, target: nil, action: nil)
let flexibleSpaceButton = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil)
contactViewController.setToolbarItems([flexibleSpaceButton, doneButton, flexibleSpaceButton], animated: false)
navigationController.isToolbarHidden = false
contactViewController.edgesForExtendedLayout = []
present(viewController: navigationController, animated: true, completion: nil)
}
但似乎可以
CNContactViewController(forNewContact
是苹果虫吗?