我有一个基于导航的应用程序,我将ABPeoplePickerNavigationController作为子视图添加到我的导航控制器中,如下所示:
在将子视图添加到 navView
之前,我已保存了该视图。
ABPeoplePickerNavigationController *peoplePicker = [[ABPeoplePickerNavigationController alloc] init];
peoplePicker.peoplePickerDelegate = self;
navView = [[UIView alloc] init];
navView = [[self.view superview] superview];
[[[self.view superview] superview] addSubview:[peoplePicker view]];
它运行良好,但是当我完成PeoplePicker并想回到先前的视图时,我使用了这段代码,但它不起作用。
[[[self.view superview] superview] addSubview:navView];
我不明白,我已经从子视图保存了navView,现在我无法将其带回来?
`[self.navigationController popToViewController:self animated:YES];`
但是GroupView没有显示出来,我认为这是因为我没有推送PeoplePicker,所以NavigationController无法将另一个视图弹回。我将其替换为子视图。如何将其改回GroupView? - Hadi Sharghi