本文介绍了iPhone:使视图透明但子视图不透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名为A的自定义UIViewController,我想将其视图添加为另一个控制器(名为B)视图作为子视图.A的视图包含两个按钮作为子视图.我想使A的视图透明,但其中的按钮不透明.我想知道有什么办法吗?
I have a Custom UIViewController named A and i want to add its view to another controllers (named B) view as subview. A's view contain two buttons as subviews. I want to make A's view transparent but the buttons in it nontransparent. I want to know is there any way to do it?
推荐答案
我注意到,
尝试将视图背景色设置为 [UIColor clearColor]
Try setting the views background color to [UIColor clearColor]
这篇关于iPhone:使视图透明但子视图不透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!