我有一个继承自ABNewPersonViewController
的类,我已经覆盖了点击Done
按钮时调用的方法。我的问题是,如何在自定义方法中访问ABRecordRef
?这是我的代码:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStylePlain target:self action:@selector(SaveMember)];
}
- (void)SaveMember
{
NSString *firstName = (NSString *)CFBridgingRelease(ABRecordCopyValue(/*???? - This is where the ABRecordRef should go*/, kABPersonFirstNameProperty));
[self dismissModalViewControllerAnimated:YES];
}