contacts - Determine iOS sort order for ABContactsHelper -
for iphone project i'm using abcontactshelper erica sadun. show contacts wan't use same sort order ios uses in e.g. adressbook.app. there possibility information?
i tried:
+ (bool) firstnamesorting; + (bool) lastnamesorting;
from abcontactshelper class these give me first name sorting. if set lastname,firstname in contact setting. in advance.
chris
abpersongetsortordering()
should work.
abpersonsortordering sortorder = abpersongetsortordering(); if (sortorder == kabpersonsortbyfirstname) { // sort firstname } else { // sort lastname }
if @ ericas code you'll see not return sort order. returns display format.
from abcontactshelper.m:
// sorting + (bool) firstnamesorting { return (abpersongetcompositenameformat() == kabpersoncompositenameformatfirstnamefirst); }
that's wrong.
maybe want skip 4 year old, unmaintained code , write yourself. addressbook framework not hard understand.
Comments
Post a Comment