use*_*059 5 background uitableview uicolor ios
我正在使用Chris Wendel的一个名为SWTableViewCell.h的github项目.在iPhone上,清晰的颜色有效.但是,在iPad上,它拒绝使tableview单元格清晰.相反,它使它变白.我一直在抨击我的大脑如何解决这个问题,但不能.我甚至试图基于png设置背景,但它不会起作用.我可以用什么类型的替代品来解决这个问题?
reb*_*o95 16
在GitHub上的项目文档中,有一种方法:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
// Set background color of cell here if you don't want default white
}
Run Code Online (Sandbox Code Playgroud)
把它改成这个:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
[cell setBackgroundColor:[UIColor clearColor]];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1162 次 |
| 最近记录: |