iosswiftcncontactcncontactviewcontroller

How to open New Contact Screen Directly?


enter image description here Can any one please guide me ? Is it possible to open contact screen programmatically in iOS (swift)


Solution

  • Try this below code. I think I am getting what you are looking for.

        let con = CNContact()
        let vc = CNContactViewController(forNewContact: con)
        _ = self.navigationController?.pushViewController(vc, animated: true)