ios 8 联系人ABPeoplePickerNavigationController

一、 ios 联系人ABPeoplePickerNavigationControllerDelegate方法,新添加下面两个联系人选中方法,适配iOS8需要实现

// Called after a person has been selected by the user.
- (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker didSelectPerson:(ABRecordRef)person NS_AVAILABLE_IOS(8_0);

// Called after a property has been selected by the user.
- (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker didSelectPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier NS_AVAILABLE_IOS(8_0);

 二、iOS8联系人系统导航栏不能自定义,使用下面方法

 [[UINavigationBar appearanceWhenContainedIn:[ABPeoplePickerNavigationController class], nil] setBackgroundImage:[UIImage imageNamed:@"navbar.png"] forBarMetrics:UIBarMetricsDefault];

 三、多次点击联系人选择崩溃

    ABMultiValueRef values = ABRecordCopyValue(person, property);
    if(values != NULL)  //需要判断空值
    {
        CFRelease(values);
    }

 


 

posted @ 2014-12-02 21:18  geweb  阅读(757)  评论(0编辑  收藏  举报