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.


Comments

Post a Comment

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -