我有一个继承自 的类,并且我已经覆盖了点击按钮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];
}