Posts

Showing posts with the label cncontactviewcontroller

Pushing NContactViewController results in black navigationbar. Why?

Pushing NContactViewController results in black navigationbar. Why? I have been trying to solve this problem for a while, so here is my question : I want to create an unknown contact with a given set of values as you may say: fileprivate func showUnknownContactViewController() { let aContact = CNMutableContact() let newEmail = CNLabeledValue(label: CNLabelWork, value: email! as NSString) aContact.emailAddresses.append(newEmail) let workPhone = CNLabeledValue(label: CNLabelWork, value: CNPhoneNumber(stringValue : phone!)) aContact.phoneNumbers.append(workPhone) let ucvc = CNContactViewController(forUnknownContact: aContact) ucvc.delegate = self ucvc.allowsEditing = true ucvc.allowsActions = true ucvc.alternateName = firstName! + " " + lastName! ucvc.title = "Company" ucvc.message = UserDefaults.standard.string(forKey: "company")! ucvc.contactStore = self.store //needed for editing/adding contacts? self...