CNContactViewController
ignores allowsActions
. SMS and Mail actions are offered:
with contactVC.allowsActions = false
.
I setup CNContactViewController in viewDidLoad()
:
...
let newContact = CNMutableContact()
newContact.emailAddresses.append(CNLabeledValue(label: CNLabelHome, value: "[email protected]" as NSString))
contactVC = CNContactViewController(forUnknownContact: newContact)
guard let contactVC = contactVC else {
return
}
contactVC.contactStore = CNContactStore()
contactVC.delegate = self
contactVC.allowsActions = false
...
Why does CNContactViewController show actions with contactVC.allowsActions = false
?
The dynamic button bar is not controlled by this setting. (Some have commented elsewhere they were added after iOS 9, when this framework was added).
This setting controls the label-style buttons that appear at the bottom of the sheet.
in iOS 11
Enabled:
Everything else is the same.
Checked with initializers "for:" and "forUnknownContact:"
No idea for previous versions, I started in iOS 11...