iPad 导航控制器在 splitview 弹出框架中的问题

发布于 2024-12-05 09:02:34 字数 1470 浏览 0 评论 0原文

我将导航控制器作为分割视图根视图控制器。 当 iPad 处于纵向模式时,根视图控制器显示在弹出控制器内。默认情况下我知道......

但我的问题是根视图控制器的顶部似乎被弹出窗口隐藏了。请参阅附图。其中主页栏按钮似乎隐藏了顶部的一小部分。

在此处输入图像描述

 RootViewController *objRootViewController = [[RootViewController alloc] init];

    DetailViewController *objDetailViewController = [[DetailViewController alloc] init];


    UINavigationController *rootNavigationController = [[UINavigationController alloc] initWithRootViewController:objRootViewController];


    UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:objDetailViewController];


    UISplitViewController *objSplitViewController = [[UISplitViewController alloc] init];
    [objSplitViewController setDelegate:objDetailViewController];


    [objSplitViewController setViewControllers:[NSArray arrayWithObjects:rootNavigationController,detailNavigationController, nil]];

    self.splitViewController = objSplitViewController;

    [self.window addSubview:self.splitViewController.view];

    [objSplitViewController release];
    objSplitViewController = nil;

    [rootNavigationController release];
    rootNavigationController = nil;

    [detailNavigationController release];
    detailNavigationController = nil;

    [objDetailViewController release];
    objDetailViewController = nil;

    [objRootViewController release];
    objRootViewController = nil;

I put a navigation controller as Split-view root-view controller.
When the iPad is in Portrait mode the root view controller is displayed inside a popover controller. Its by default I know....

But My problem is The top of root-view controller is seems hide by popover. See the attched image. In it the home bar-button seems hide a small portion in top.

enter image description here

 RootViewController *objRootViewController = [[RootViewController alloc] init];

    DetailViewController *objDetailViewController = [[DetailViewController alloc] init];


    UINavigationController *rootNavigationController = [[UINavigationController alloc] initWithRootViewController:objRootViewController];


    UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:objDetailViewController];


    UISplitViewController *objSplitViewController = [[UISplitViewController alloc] init];
    [objSplitViewController setDelegate:objDetailViewController];


    [objSplitViewController setViewControllers:[NSArray arrayWithObjects:rootNavigationController,detailNavigationController, nil]];

    self.splitViewController = objSplitViewController;

    [self.window addSubview:self.splitViewController.view];

    [objSplitViewController release];
    objSplitViewController = nil;

    [rootNavigationController release];
    rootNavigationController = nil;

    [detailNavigationController release];
    detailNavigationController = nil;

    [objDetailViewController release];
    objDetailViewController = nil;

    [objRootViewController release];
    objRootViewController = nil;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文