App crash on use of PeoplePicker, but not in same view

前端 未结 3 1729
花落未央
花落未央 2021-01-12 19:20

Update 2, I hope this helps someone, there is a solutions at the following link: https://discussions.apple.com/thread/5498630?start=0&tstart=0 , evidently th

3条回答
  •  醉酒成梦
    2021-01-12 19:39

    Sorry to answer my own question, but another work around to this that requires little change is to use CF Retain to correct the over release I was experiencing. I retained the person and the peoplePicker and all was resolved. Thanks for everyone who tried to help me solve this.

    - (void)peoplePickerNavigationControllerDidCancel:
    (ABPeoplePickerNavigationController *)peoplePicker
    {
    
        [self.navigationController dismissViewControllerAnimated:YES completion:nil];
       CFRetain((__bridge CFTypeRef)(peoplePicker));
    }
    - (BOOL)peoplePickerNavigationController:
    (ABPeoplePickerNavigationController *)peoplePicker
          shouldContinueAfterSelectingPerson:(ABRecordRef)person
                                    property:(ABPropertyID)property
                                  identifier:(ABMultiValueIdentifier)identifier
    {
        [self displayPerson:person];
        [self.navigationController dismissViewControllerAnimated:YES completion:nil];
        CFRetain(person);
        CFRetain((__bridge CFTypeRef)(peoplePicker));
        return NO;
    
    }
    

提交回复
热议问题