开发者

Why my ABPersonViewController not showing all the properties?

开发者 https://www.devze.com 2022-12-15 19:29 出处:网络
Why my ABPersonViewController is not showing all the properties? Currently it is showing only phone number properties. It is not the e-mail ids, addresses, birth day and other info. My contact has all

Why my ABPersonViewController is not showing all the properties? Currently it is showing only phone number properties. It is not the e-mail ids, addresses, birth day and other info. My contact has all this info. How the Phonebook's/Contact's ABPersonViewController is showing all this info? And How can I get the "Text Message", "Share Contact" and "开发者_C百科Add To Favorites" buttons in my ABPersonViewController?

Any help would be appreciated.


According to the ABPersonViewController reference, you can set the displayedProperties property of the controller to an NSArray.

Try setting it e.g. to

[NSArray arrayWithObjects:kABPersonEmailProperty,kABPersonBirthdayProperty,nil];

setting whichever properties from the available properties list you want.


 ABPersonViewController *abpvc=[[ABPersonViewController alloc]init];
 abpvc.allowsActions=YES;

It worked for me in displaying Send Message and add To favorites buttons in Simulator.

0

精彩评论

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