我尝试在弹出控制器的视图中显示不同视图控制器的视图。我现在尝试了三个小时,但没有成功。基本上这就是我所做的:
- (IBAction)buttonTapped:(id)sender {
NSDictionary *options = [NSDictionary dictionaryWithObject: [NSNumber numberWithInteger:UIPageViewControllerSpineLocationMin] forKey:UIPageViewControllerOptionSpineLocationKey];
UIPageViewController *pageVC = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStylePageCurl navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:options];
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"MainStoryboard_iPad"
bundle:[NSBundle mainBundle]];
UIViewController *firstVC = [sb instantiateViewControllerWithIdentifier:@"FirstTableViewController"];
UIViewController *secondVC = [sb instantiateViewControllerWithIdentifier:@"SecondViewController"];
NSArray *viewControllers = [[NSArray alloc] initWithObjects:firstVC, secondVC, nil];
[pageVC setViewControllers:viewControllers direction:UIPageViewControllerTransitionStylePageCurl animated:NO completion:nil];
UIButton *button = sender;
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:pvc];
[popover presentPopoverFromRect:button.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
}
这就是我看到的:
我在这里想念什么?