UITableView 方法总结
来源:互联网 发布:淘宝怎么退订服务 编辑:程序博客网 时间:2024/05/16 00:28
1. 给tableview添加一个背景图片。
self.tableView.backgroundColor=[UIColor clearColor];
UIImageView *imageview = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"home_bg.png"]];
[self.tableView setBackgroundView:imageview];
2. 给tableview中的cell添加背景图片。
重写函数
-(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];
}
3.去掉tableview中的分割线
separatorStyle = UITableViewCellSeparatorStyleNone;
4.给tableview中的cell加载背景图
[cell.contentView addSubview:]
5.实现如下图
a.去掉tableview中的分割线
b.设置separate的值为none,设置tableview的background为clearcolor
c.在cell中添加UILabel
- UITableView方法的总结
- UITableView 方法总结
- UITableView 常用方法总结
- iOS-UITableView方法总结
- UITableView的基本方法总结
- UITableView常用方法、属性总结
- UITableView里面的属性和方法总结
- 【iOS开发】 UITableView SDK所有方法总结
- UI 常用方法总结之--- UITableView
- UITableView的自定义cell方法总结
- UITableView 应用(三)UITableViewDelegate 方法总结
- UITableView总结
- UITableView总结
- UITableView总结
- UITableView总结
- UITableView 总结
- UITableView---总结
- UITableView总结
- Android 之 Window、WindowManager 与窗口管理
- jquery grid插件 Flexigrid + servlet
- 常用关键字
- IOS开发之----Category的使用
- Subversion服务器搭建
- UITableView 方法总结
- 收藏
- Android Activity 生命周期的透彻理解
- sql跨数据库复制表数据
- 理解WebKit和Chromium: Chromium的多线程机制
- pydev简介
- 远程桌面突然不能粘贴的解决方案
- IOS和Android开发的一些个人感受
- Android TextView 加入图片