我可以使用弹出框控制器返回页面视图控制器中的先前视图控制器。有没有办法这样做。
我正在尝试此代码。
-(void)goNext
{
Vcontr = [self.pageController.viewControllers objectAtIndex:0];
UIPopoverController *popoverController = [[UIPopoverController alloc] initWithContentViewController:pageController];
if(popoverController == nil){ //make sure popover isn't displayed more than once in the view
popoverController = [[UIPopoverController alloc] initWithContentViewController:pageController];
}
[popoverController presentPopoverFromRect:self.view.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
popoverController.delegate = self;
}
答案 0 :(得分:0)
以下是一些教程:
iPad for iPhone Developers 101: UIPopoverController Tutorial
iPad UIPopoverController Video
您可以按Apple developers
找到示例代码答案 1 :(得分:0)
UIPopoverController *popoverController ;///defin this in the .h
if(popoverController == nil){ //make sure popover isn't displayed more than once in the view
popoverController = [[UIPopoverController alloc] initWithContentViewController:yourPageViewController];
}
[popoverController presentPopoverFromRect:self.view.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
popoverController.delegate = self;
}