从ABNewPersonViewController的Overridden Done Button Tap获取ABRecordRef

时间:2012-10-29 03:52:42

标签: objective-c ios

我有一个继承自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];
}

0 个答案:

没有答案