开发者

How to get the contacts programmatically using MonoTouch c#?

How to get the contacts in iPhone? I need to get all attributes from iPhone 开发者_如何学Gocontacts. How to achieve programmatically using MonoTouch?


ABAddressBook iPhoneAddressBook = new ABAddressBook();

ABPerson[] Contacts = iPhoneAddressBook.GetPeople();

foreach (ABPerson item in Contacts) {

    ABMultiValue<NSDictionary> Contact  = item.GetPhones();

    foreach (ABMultiValueEntry<NSDictionary> cont in Contact) {
                // cont.Label  indicates the type ( home,work,etc)
        // get the contact via cont.Value

    } 
}


Use ABAddressBook

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜