I've got a rootViewController that, at one point, displays a peoplePickerNavigationController. I'm trying to push a second view controller when my user selects a specific contact property, like so:
我有一个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;
}
This compiles just fine, but when I run the code in the simulator and run through the peoplePicker, nothing happens when I select a contact property. On a whim, I added a [self dismissModalViewControllerAnimated:YES]; just before [ruleBuilder release]; and that dismisses the peoplePicker, but otherwise has no effect on my missing ruleBuilder.
编译得很好,但是当我在模拟器中运行代码并运行peoplePicker时,当我选择联系人属性时没有任何反应。一时兴起,我添加了一个[self dismissModalViewControllerAnimated:YES];就在[ruleBuilder发布]之前;并且解散了peoplePicker,但是对我缺少的ruleBuilder没有任何影响。
Any ideas?
有任何想法吗?
1 个解决方案
#1
0
Found the solution:
找到解决方案:
[picker pushModalViewController:ruleBuilder animated:YES];
#1
0
Found the solution:
找到解决方案:
[picker pushModalViewController:ruleBuilder animated:YES];