透明的 UIPopover [英] Transparent UIPopover

查看:16
本文介绍了透明的 UIPopover的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让 UIPopOver 透明(alpha = 0.75 左右).不幸的是,UIPopOver 没有 alpha 属性.我需要呈现一个弹出框,以便它下面的视图仍然部分可见.任何想法

Is there a way to make the UIPopOver transparent (alpha = 0.75 or so). Unfortunately there is no alpha property for UIPopOver. I need to present a popover so that the view beneath it will still be partially visible. Any ideas

推荐答案

popoverController.contentViewController.view.alpha = 0.5;

alpha 是 UIView 的一个属性,因此您需要获取 popOver 的视图,然后将 alpha 设置为该视图.

alpha is an property of an UIView so you need to get the view of the popOver and then set the alpha to that view.

这篇关于透明的 UIPopover的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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