如何在CNContactPickerViewController中隐藏组和取消按钮?

时间:2016-05-03 15:47:43

标签: ios swift cancel-button contactpicker

我正在使用CNContactPickerViewController,我想要隐藏取消和组按钮 我尝试了contactPickerViewController.navigationItem.leftBarButtonItem = nil

contactPickerViewController.navigationItem.hidesBackButton = true

但这不起作用.. 这里是我创建控制器的代码

let contactPickerViewController = CNContactPickerViewController()

    contactPickerViewController.predicateForEnablingContact = NSPredicate(format: "phoneNumbers.@count > 0",
        argumentArray: nil)

    contactPickerViewController.delegate = self
    contactPickerViewController.navigationItem.leftBarButtonItem = nil
    contactPickerViewController.navigationItem.hidesBackButton = true

    presentViewController(contactPickerViewController, animated: true, completion: nil)

帮助任何人?感谢

0 个答案:

没有答案