我有一个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代码,没事的时候我选择一个联系人属性发生。在异想天开,我添加了一个[自dismissModalViewControllerAnimated:YES];之前[ruleBuilder释放];并驳回peoplePicker,但在其他方面对我的思念ruleBuilder没有影响。

任何想法?

有帮助吗?

解决方案

找到了解决方案:

[picker pushModalViewController:ruleBuilder animated:YES];
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top