tableView的属性设置解析
2015-11-23 16:05
316 查看
动态隐藏tableView的Cell的底部线条
设置tableView的偏移量
tableView的分割线左边间距为0
//初始化tableView时设置
tableView的代理函数
tabelView选中后颜色反选
在tableView索引中显示搜索按钮
tableView.tableFooterView= [[UIViewalloc]init];
设置tableView的偏移量
[tableViewsetContentOffset:CGPointMake(0,100) animated:YES];
tableView的分割线左边间距为0
//初始化tableView时设置
if([tableViewrespondsToSelector:@selector(setSeparatorInset:)]) {[tableViewsetSeparatorInset:UIEdgeInsetsZero]; } if([tableViewrespondsToSelector:@selector(setLayoutMargins:)]) {[tableViewsetLayoutMargins:UIEdgeInsetsZero]; }
tableView的代理函数
- (void)tableView:(UITableView*)tableView willDisplayCell:(UITableViewCell*)cell forRowAtIndexPath:(NSIndexPath*)indexPath {if([cellrespondsToSelector:@selector(setSeparatorInset:)]){ [cellsetSeparatorInset:UIEdgeInsetsZero]; } if([cellrespondsToSelector:@selector(setLayoutMargins:)]){[cellsetLayoutMargins:UIEdgeInsetsZero]; } }
tabelView选中后颜色反选
-(void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath{ [tableViewdeselectRowAtIndexPath:indexPathanimated:YES]; }
在tableView索引中显示搜索按钮
- (NSArray*)sectionIndexTitlesForTableView:(UITableView*)tableView{ NSMutableArray*arr = [[[NSMutableArrayalloc]initWithCapacity:0]autorelease]; [arraddObject:@"{search}"];//等价于[arr addObject:UITableViewIndexSearch]; returnarr; }
相关文章推荐
- java日期格式大全 format SimpleDateFormat
- ServletRequest,HttpServletRequest ServletResponse,ServletResponse的区别
- 被忽略的技能
- 手游性能之渲染分析
- JAVA调用HTTPS双向认证API
- c:out escapeXml
- 第12周项目2-操作用邻接表存储的图
- 做一个Active To
- 本人对Oracle Inventory模块的一些了解
- linux shell编程
- Web Service入门教程
- 编译spark输出的信息
- 学习日记--网络通信框架--Volley应用
- Cookie工具类
- 声波通信开源项SinVoice介绍三
- 委托-异步调用-泛型委托-匿名方法-Lambda表达式-事件
- 问题:Oracle to_date;结果:oracle常用的时间格式转换
- C#反射取得方法、属性、变量
- proxool+tomcat配置
- Android double保留两位小数:截取 和 四舍五入