如何在iOS7中的UIPopoverController中禁用更暗的透明效果? [英] How to disable darker transparent effect in UIPopoverController in iOS7?

查看:92
本文介绍了如何在iOS7中的UIPopoverController中禁用更暗的透明效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用UIPopoverController在iPad iOS7中弹出一个视图,如下所示:

I use UIPopoverController to popup an view in iPad iOS7 like this:

    if (!self.popover) {
        UIViewController *popupVC = [[UIViewController alloc] init];
        [popupVC.view addSubview:thePopupView];
        popupVC.preferredContentSize = CGSizeMake(240, 140);
        self.popover = [[UIPopoverController alloc] initWithContentViewController:popupVC];
        self.popover.delegate = self;
    }


    [self.popover presentPopoverFromBarButtonItem:barButton permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

但当弹出窗口处于活动状态时,会使屏幕变暗,而此效果不会影响iOS6中的其他观点。

But when popover active, it make screen darker while this effect not affect other views in iOS6.

如何克服这个问题?谢谢!

How to overcome this issue? Thanks!

推荐答案

如果你的意思是弹出窗口下插入的调光视图,只有一个解决方法 - 使用自定义 popoverBackgroundViewClass

If you mean the dimming view that is inserted under the popover, there is only one workaround - use a custom popoverBackgroundViewClass.

这很复杂,但并不像你想象的那么复杂。

It's complicated, but not as complicated as you might think.

这篇关于如何在iOS7中的UIPopoverController中禁用更暗的透明效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆