ios - What is the labels order in ABMultiValueCopyLabelAtIndex() -
i testing ios addressbook framework , trying figure what, what's best way extract value @ specific label , wondering @ same time if order of these labels change, random reason.
this doing when adding new contact or adding existing one:
let phone:abmutablemultivalue = abmultivaluecreatemutable( abpropertytype(kabstringpropertytype)).takeretainedvalue() abmultivalueaddvalueandlabel(phone, phonenumber, kabpersonphonemainlabel, nil)
and later on in delegate call unknownpersonviewcontroller()
doing this:
let phone: abmultivalueref = abrecordcopyvalue(person, kabpersonphoneproperty).takeretainedvalue() firstphone = abmultivaluecopyvalueatindex(phone, 0).takeretainedvalue() as! string
notice assuming main label @ index 0. know comparison cfstring label possible, these labels funny, giving me weird gut feeling when comparing agains them. so, not sure how go this.
you should not assume order. have read value of label. "look funny" easy deal with: of form "_$!<label>!$_"
, "_$!<"
, ">!$_"
merely delimiters can rely on.
Thanks for sharing -
ReplyDeleteCRUD operations in python using mysql
password_verify in PHP
Matplotlib pie chart
Histogram equalization OpenCV
How to display PDF in HTML using javascript
Histogram OpenCV Python
How to pass value through url in PHP