Why my ABPersonViewController not showing all the properties?
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.
精彩评论