您的位置:首页 > 移动开发 > IOS开发

ios6,tableView设置背景透明无效

2013-03-18 17:34 399 查看
这个问题只在UITableViewStyleGrouped类型的UITableView中出现,UITableViewStylePlain类型的tableView没有这个问题,因为Group类型的TableView有个backgroundView,而plain类型的TableView没有(backgroundView属性为nil),目前看来,这可能因为backgroundView在中间挡住了背景色。

目前对于这个问题的解决方法是将Group类型的tableView的backgroundView设为一个新的空白View或简单的设置为nil.如下
tableView.backgroundView = [[UIView alloc]init]; tableView.backgroundColor = [UIColor clearColor];



tableView.backgroundView = nil; tableView.backgroundColor = [UIColor clearColor];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: