View 中的 TableView,如何使其透明 [英] TableView in View, how do i make it transparent

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

问题描述

我有一个嵌入到主视图中的表视图,这是我可以使用静态表的唯一方法.主视图有固定的背景颜色,嵌入视图不继承,而且不透明,有什么办法可以做到这一点?

I have a table-view embedded in to a main view, its the only way i can use static tables. The main view has a fixed background color, which the embeded view does not inhreit, and it is not transparent, is there any way to do this?

为一个视图声明两次颜色似乎很愚蠢

It seems stupid to declare the color twice for one view

推荐答案

试试这个代码:

self.view.backgroundColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0.35]; 

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

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