
UITableview(列表)
梦醒梦飞翔
做事有始有终,不轻言放弃。
展开
-
iOS UITableView 移除单元格选中时的高亮状态
1.cell.selectionStyle = UITableViewCellSelectionStyleNone;该方法缺点是虽然cell可以被用户选中后,但不会被突出显示 2.-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //原创 2015-04-08 15:25:50 · 726 阅读 · 0 评论 -
UITableView进行讲解
首先、对UITableView进行讲解,下面有对它进行实际的应用 UITableView 显示大型内容的列表 单行,多列 垂直滚动,没有水平滚动 大量的数据集 性能强大,而且普遍存在于iPhone的应用程序中 TableView原创 2015-04-08 15:27:19 · 634 阅读 · 0 评论 -
清除UITableView底部多余的分割线
1、加方法 -(void)setExtraCellLineHidden: (UITableView *)tableView{ UIView *view = [UIView new]; view.backgroundColor = [UIColor clearColor]; [tableView setTableFooterView:view]; } 2、在 - (voi原创 2015-04-08 15:50:14 · 782 阅读 · 0 评论 -
iOS 解决cell内容重复的解决办法
UITableView继承自UIScrollview,是苹果为我们封装好的一个基于scroll的控件。上面主要是一个个的UITableViewCell,可以让UITableViewCell响应一些点击事件,也可以在UITableViewCell中加入UITextField或者UITextView等子视图,使得可以在cell上进行文字编辑。 UITableView中的cell可以有很多,一般会转载 2015-04-08 11:46:14 · 875 阅读 · 0 评论 -
iOS UITextView 输入内容实时更新cell的高度
先上图,我们最终要实现的效果是这样的:可参考(http://www.cocoachina.com/ios/20141226/10778.html) 图 1:实时更新 cell 高度 实现上面效果的基本原理是: 在 cell 中设置好 text view 的 autolayout,让 cell 可以根据内容自适应大小 text view 中输入内容,根据内原创 2015-04-08 15:13:26 · 1018 阅读 · 1 评论 -
UITableView每个cell之间的默认分割线怎么去掉,cell的显示
tableView.separatorStyle = NO;//隐藏 tableView.separatorStyle = YES;显示原创 2015-04-08 15:49:12 · 7406 阅读 · 0 评论 -
如何让 UITableView 的 headerView跟随 cell一起滚动
将UIView设置为 整个tableView的headerView,而不是 section 0的headerView self.tableView.tableHeaderView=header; 这样,就可以完美的满足 headerView跟随cell的内容一起滚动的要求拉。 结论:设置 UIView为 tableView的tableHeaderView即可实现 headerView跟随t原创 2015-04-08 15:12:13 · 868 阅读 · 0 评论 -
iOS 避免cel重用机制
今天在做项目的过程中,遇到了cell重用,经过查找资料和自己的总结,总结出一条简单实用的: -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // static NSString *CellId转载 2015-04-08 11:20:50 · 465 阅读 · 0 评论