Handling click events inside ABPersonViewController; not responding to clicks
am using this function in my program for displaying contacts in my
program. But when i click on the firlds in the abpersonview nothing
happens. My class has an object of AbPersonView ,below is my class
definition
- (BOOL)personViewController:(ABPersonViewController *)
personViewControllershouldPerformDefaultActionForPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier
{
NSLog(@"IN");
return YES;
}
#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
and i am using this Currentpersonview as
self.currentPersonView=[[ABPersonViewController
alloc]initWithNibName:@"ContactTable.h" bundle:nil];
if(isFiltered)
self.person=CFArrayGetValueAtIndex(self.filteredData,indexPath.row);
else
{
NSLog(@"%ld index:%d",
CFArrayGetCount(self.contactAdd),indexPath.row);
self.person=(ABRecordRef)CFArrayGetValueAtIndex(self.contactAdd,indexPath.row);
}
self.currentPersonView.displayedPerson=&(*self.person);
self.currentPersonView.allowsEditing=YES;
self.currentPersonView.allowsActions=YES;
[self.navigationController pushViewController:self.currentPersonView
animated:YES];
But i cant get any respose on the function when i click on the
ABPersonView.....
What might be the problem??
No comments:
Post a Comment