UITableView清晰的背景 [英] UITableView clear background

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

问题描述

我意识到iOS 7还没有正式发布,我们不应该讨论它,但我会疯狂地试图弄清楚这个问题。在iOS 6上,我的表视图是透明的,看起来很棒。第一次运行iOS 7,背景为白色。

I realize that iOS 7 has not officially been released and we should not discuss it BUT I am going crazy trying to figure out this problem. On iOS 6, my table view was transparent and looked great. First time running iOS 7, and the background is white.

我已经尝试将表backgroundColor,单元格颜色等制作成UIColor clearColor但没有变化。

I have tried making the table backgroundColor, cell color etc etc to UIColor clearColor but have no change.

如何解决这个问题?

推荐答案

    // Fix for iOS 7 to clear backgroundColor
    cell.backgroundColor = [UIColor clearColor];
    cell.backgroundView = [[UIView new] autorelease];
    cell.selectedBackgroundView = [[UIView new] autorelease];

in cellForRowAtIndexPath

in cellForRowAtIndexPath

此外,请确保你的tableview实际上有透明的背景(在故事板中):

Also, make sure that your tableview actually has transparent background (in storyboard):

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

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