我有一个 rootViewController,它有时会显示一个 peoplePickerNavigationController。当我的用户选择特定的联系人属性时,我正在尝试推送第二个视图控制器,如下所示:
-(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)picker shouldContinueAfterSelectingPerson:(ABPersonRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier {
RuleBuilder *ruleBuilder = [[RuleBuilder alloc] initWithNibName:@"RuleBuilder" bundle:nil];
[self pushModalViewController:ruleBuilder animated:YES];
[ruleBuilder release];
return NO;
}
这编译得很好,但是当我在模拟器中运行代码并通过 peoplePicker 运行时,当我选择联系人属性时没有任何反应。一时兴起,我添加了一个 [self dismissModalViewControllerAnimated:YES]; 就在 [ruleBuilder 发布] 之前;并且解雇了peoplePicker,但对我缺少的ruleBuilder没有影响。
有任何想法吗?