在iPhone中向所选联系人发送短信

时间:2015-11-06 18:37:15

标签: ios objective-c abpeoplepickerview

我想将短信邀请发送到从联系人列表中选择的多个电话号码,我尝试使用ABPeoplePicker但是它没有正确显示,我的联系人列表总是显示为空白。

- (void)viewDidLoad
{
  [super viewDidLoad];

   UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(showAddressBook)];

   self.navigationItem.rightBarButtonItem = addButton;
}

#pragma mark - Private method implementation

-(void)showAddressBook{
    _addressBookController = [[ABPeoplePickerNavigationController alloc] init];
   [_addressBookController setPeoplePickerDelegate:self];
   [self presentViewController:_addressBookController animated:YES completion:nil];
}

我觉得我做错了什么,任何人都可以帮助我。

0 个答案:

没有答案