[swift] UITableView单元格背景透明问题
来源:互联网 发布:linux运行程序命令gcc 编辑:程序博客网 时间:2024/05/18 04:33
ios7之后UITableViewCell背景无法设置透明了,所以无法看到tableview之下UIImageView上的图片,所以只写这样的代码无效
var imageView =UIImageView(image: UIImage(named: "background.jpeg"))
self.view.addSubview(imageView)
self.tableView =UITableView(frame: self.view!.frame)
self.tableView.delegate =self
self.tableView.dataSource =self
self.tableView.backgroundColor =UIColor.clearColor()
self.view.addSubview(self.tableView)
所以要实现UITableViewDelegate中的方法
func tableView(tableView:UITableView!, willDisplayCell cell: UITableViewCell!, forRowAtIndexPath indexPath: NSIndexPath!)
{cell.backgroundColor =UIColor.clearColor()}
即可实现这样的效果
0 0
- [swift] UITableView单元格背景透明问题
- UITableView设置背景透明
- UITableView 背景透明
- UItableview背景透明
- UITableView设置背景为透明
- UITableView设置背景为透明
- UITableView为group时设置背景透明
- IOS学习 UITableView 单元格风格和修改单元格背景
- QWidget背景(透明)问题
- iframe背景透明问题
- QWidget背景(透明)问题
- iframe 背景透明问题
- QWidget背景(透明)问题
- 背景透明问题 rgba
- IOS iPhone 开发 UItableView中的单元格背景渐变
- Gdiplus图片背景透明问题
- 解决flash背景透明问题
- IOS7 UITableCell背景透明问题
- EditPlus配置CTags,实现函数提示和跳转
- NSNumber与NSInteger的区别
- hadoop入门和简易分布式搭建
- Project Euler 9
- 你知道SEO团队的几种运营模式吗?
- [swift] UITableView单元格背景透明问题
- codeforces 463 B Caisa and Pylons
- setTimeout
- 让QToolBar工具栏的按钮既显示图标又显示文字
- 直接插入排序、希尔排序、堆排序的比较
- 鼠标悬停
- 取整数的最大值最小值值,
- NSString的常用用法(补充)
- ie6却无法点击a连接