UITableView 的Cell之间的间隔
2015-11-12 10:29
381 查看
自定义view作为每个cell的间隔
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return
self.recentArray.count;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return
1;
}
//设置每个cellfootview的高度
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return
10;
}
//设置footview的颜色
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
UIView *footView = [[UIView
alloc] init];
footView.backgroundColor =
IWColor(239,
239, 239);
return footView;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return
self.recentArray.count;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return
1;
}
//设置每个cellfootview的高度
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return
10;
}
//设置footview的颜色
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
UIView *footView = [[UIView
alloc] init];
footView.backgroundColor =
IWColor(239,
239, 239);
return footView;
}
相关文章推荐
- UITableView 滑动Cell删除
- Android 非UI线程使用View.post()方法一处潜在的内存泄漏
- UIImage应用与内存管理,UIImage加载图像方法
- UIlabel
- easyui隐藏下拉框
- postgres 错误duplicate key value violates unique constraint 解决方案
- Dictionary通过下标获取key和value
- UIEdgeInsetsMake的作用
- runOnUiThread简单应用
- NSThread、NSOperation、GCD、NSOperationQueue
- IOS开发之 ---- iOS8中提示框的使用UIAlertController(UIAlertView和UIActionSheet二合一)
- java集合之Queue
- 在自定义的UINavigationController中设置背景图片
- 开发kendo-ui弹窗组件
- [sicily]1209. Sequence Sum Possibi
- Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs
- 普林斯顿大学算法第一部分学习总结(Week4-Priority Queue)
- ——黑马程序员——OC中NSNumber、NSValue、NSDate 的使用总结
- Longest Increasing Subsequence
- Range Sum Query - Immutable leetcode 303