嗨,我目前正在为一个客户项目工作,在那里我需要访问电话联系人。
我设法请求访问联系人的权限,我正在处理这两个不同的状态(授予,拒绝)。显然,客户需要以下工作流:
我管理了完整的流程并获取了完整的数据。不,我困在两个问题上:
我是不是快到下一个ViewController去填self.contactsArray了?
我的另一种方法是在授予访问权限时向我的rootViewController发送一个Notifictaion,然后执行segue。这是我能得到的最接近的结果,但是ViewController推送延迟了8-10秒.
> - (void)receivedNotification:(NSNotification *)notification {
> if (access) {
> self.contactsArray = [self.addressBook getAllContacts];
> if (self.contactsArray.count != 0) {
> [self performSegueWithIdentifier:@"addEntryrSegue" sender:self];
> } else {
> [self performSegueWithIdentifier:@"noContactsSegue" sender:self];
> }
> }
> }提前谢谢。我希望我得到的解释足够充分。
发布于 2014-12-31 22:35:41
https://stackoverflow.com/questions/26466516
复制相似问题