单击按钮时,会出现嵌入在 NavigationView 中的 popoverView。我的代码如下:
-(IBAction)myStuffPOP:(id)sender
{
if(myStuffListViewController ==nil)
{
myStuffListViewController = [[MyStuffListViewController alloc] init];
}
UINavigationController *navcontroller=[[[UINavigationController alloc] initWithRootViewController:myStuffListViewController] autorelease];
// Here we create popover controller.
mystuffPopoverView = [[UIPopoverController alloc] initWithContentViewController:navcontroller] ;
CGRect popoverRect = [self.view convertRect:[sender frame] fromView:[sender superview]];
popoverRect.size.width = MIN(popoverRect.size.width, 100);
popoverRect.size.height = 40;
[mystuffPopoverView presentPopoverFromRect:popoverRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
[navcontroller setNavigationBarHidden:NO];
}
在 PopoverView 的 NavigationView 中:
1st subView ---> 2nd SubView ---> 3rd Subview
如果我触摸3rd SubView
, PopoverView 就会消失。
我的问题是:
当我再次单击按钮时,我想查看最新的视图 -3rd SubView not 1st SubView.