ios - Selecting multiple contacts/contact properties in CNContactPicker -




i'm using predicates defined here: how can pick contact phone number in ios?.

contactspicker.predicateforenablingcontact = nspredicate(format:"phonenumbers.@count > 0") contactspicker.predicateforselectionofcontact = nspredicate(format: "phonenumbers.@count == 1") contactspicker.displayedpropertykeys = [cncontactphonenumberskey] 

i have defined following delegate methods:

func contactpicker(_ picker: cncontactpickerviewcontroller,                    didselect contactproperty: cncontactproperty) {     print(contactproperty) }  func contactpicker(_ picker: cncontactpickerviewcontroller, didselect contact: cncontact) {     print(contact) } 

the behavior expect user gets pick phone number properties multiple different contacts , when user clicks done, list of these properties , contacts. unfortunately, code above exits picker when user clicks done. means user cannot select multiple phone numbers and/or multiple contacts , can select 1 before picker exits. how can change selects multiple properties , contacts , submits them on clicking on done?





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -