Iphone 处理ABPersonViewController内的单击事件;对点击没有反应

Iphone 处理ABPersonViewController内的单击事件;对点击没有反应,iphone,abpersonviewcontroller,Iphone,Abpersonviewcontroller,我在程序中使用此功能在程序中显示联系人。但是当我点击abpersonview中的字段时,什么都没有发生 - (BOOL)personViewController:(ABPersonViewController *) personViewControllershouldPerformDefaultActionForPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier

我在程序中使用此功能在程序中显示联系人。但是当我点击abpersonview中的字段时,什么都没有发生

- (BOOL)personViewController:(ABPersonViewController *) personViewControllershouldPerformDefaultActionForPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
        {
            NSLog(@"IN");
                return YES;
        }
我的类有一个AbPersonView对象,下面是我的类定义

 #import <UIKit/UIKit.h>
    #import <CoreFoundation/CoreFoundation.h>
    #import<AddressBookUI/AddressBookUI.h>




         @interface ContactTable : UIViewController<UITableViewDataSource,UISearchBarDelegate,UITableViewDelegate,ABNewPersonViewControllerDelegate,UIAlertViewDelegate,ABPersonViewControllerDelegate>

         @property  CFMutableArrayRef  filteredData;

            @property  CFArrayRef contactAdd;

            @property ABRecordRef person;

            @property ABAddressBookRef addressBook;

            @property ABPersonViewController *currentPersonView;

            @property (weak, nonatomic) IBOutlet UISearchBar *contactSearchBar;

            @property (weak, nonatomic) IBOutlet UITableView *contactTableView;

            @end
但是当我点击ABPersonView时,我无法得到任何关于该函数的响应


可能有什么问题???

我想您需要设置代理:

 self.currentPersonView.personViewDelegate = self;//or some other class...
并在delegate类中实现相应的delegate方法:

– personViewController:shouldPerformDefaultActionForPerson:property:identifier:
一定要在这个类的接口中声明

– personViewController:shouldPerformDefaultActionForPerson:property:identifier: