iphone - 如何在导航 Controller 栏上叠加 View ?

标签 iphone objective-c cocoa-touch uikit uinavigationcontroller

我有点小问题。我正在尝试向我的应用程序添加一个 popoverview,但部分 popoverview 被我的导航 Controller 栏隐藏了。如何让我的 popoverview 覆盖在 navcontrollerbar 之上?这是问题的图片:http://img593.imageshack.us/img593/4056/viewn.jpg

这是我正在使用的代码:

- (IBAction)onButtonClick:(UIButton *)button {

if (self.popoverController) {
    [self.popoverController dismissPopoverAnimated:YES];
    self.popoverController = nil;
    [button setTitle:@"Show Popover" forState:UIControlStateNormal];
} else {
    UIViewController *contentViewController = [[WEPopoverContentViewController alloc] initWithStyle:UITableViewStylePlain];

    self.popoverController = [[[WEPopoverController alloc] initWithContentViewController:contentViewController] autorelease];
    [self.popoverController presentPopoverFromRect:button.frame 
                                            inView:self.view 
                          permittedArrowDirections:UIPopoverArrowDirectionDown
                                          animated:YES];
    [contentViewController release];
    [button setTitle:@"Hide Popover" forState:UIControlStateNormal];
}
}

有没有办法在导航 Controller 栏上方制作这个弹出窗口?

希望有人知道如何解决这个问题,在此先感谢。

最佳答案

这可能与 WEPopoverController presentPopoverFromRect:inView:permittedArrowDirections:animated: 的 inView 参数有关吗?除了在 self.view 中显示它之外,您能否在 View 层次结构中进一步显示(如在 self.view.window 中)?

关于iphone - 如何在导航 Controller 栏上叠加 View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4576847/

相关文章:

iphone - 将 uiview 添加到 uiviewcontroller

android - 单击电话 : link 时抑制 native 对话框

iphone - rightbarbuttonitem 没有显示?

iphone - iOS:我如何接收 HTTP 401 而不是 -1012 NSURLErrorUserCancelledAuthentication

cocoa-touch - 创建今天特定小时和分钟的 NSDate

iphone - 为什么 Apple 以这种方式创建 View

ios - 如何在 32 位和 64 位处理器 iOS 之间发送 int

ios - 如何限制从顶部定位我的标签,但在我隐藏导航栏时不让它移动(因为它调整 View 高度)?

ios - 核心数据 ios 8 崩溃

ios - 设置内容类型覆盖httpbody?