可以给tableview添加一个背景图片吗?? 如何添加 求代码!!!!~
解决方案 »
- 怎么在iPhone应用程序中调用命令行并返回结果???
- zlib解压uncompress在IPhone4上都没问题,在IPhone3GS上总是失败
- 求iPhone软件开发创意!!!!!!!
- 帮忙推荐SIP服务器软件,谢谢!
- 大神帮我看看这段代码怎么改,有点看不懂
- 没有苹果电脑怎么做ios开发的
- 需要做个支持大部分流媒体格式的视频,该怎么做才好?
- TCP发起连接之后断开连接的代理方法中报错Socket closed by remote peer,服务端和客户端都是iPhone
- iOS能不能屏蔽控制台打印信息
- iOS开发,刚接手React-native,遇到的问题,求教!
- iphone新手看过来
- 关于XCode版本和sqlite3 的问题,,急,谢谢
另外,就是在下面增加一层图片,将表格的背景色设置为透明。
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{ cell.backgroundView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"58rowWrap.png"]]; //cell的背景图
cell.textLabel.backgroundColor = [UIColor clearColor];
}
给tableView 直接这样UIImageView *tableBg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"XXX.png"]];
[yourTable setBackgroundView:tableBg];
[tableBg release];
2) code : set tableView.backgroundColor = [UIColor cleanColor]; you will see the background image now...
2,自定义cell
3,自定义或修改UITableView类……
UIImageView *imageview = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"home_bg.png"]];
[self.tableView setBackgroundView:imageview];
[imageview release];