[IOS]UITableView横向滚动
来源:互联网 发布:微博淘宝优惠券 编辑:程序博客网 时间:2024/05/22 17:06
[IOS]UITableView横向滚动
//首先,实例一个UITableView,并对其逆向旋转90° UITableView *tableview = [[UITableView alloc] init]; [tableview setFrame:self.view.bounds]; [self.view addSubview:tableview]; [tableview setTransform:CGAffineTransformMakeRotation(-M_PI/2)]; [tableview setPagingEnabled:YES];//按整页翻动 //跳转到最后一行或者任意指定行 NSIndexPath* indexPath = [NSIndexPath indexPathForRow:5 inSection:0]; [tableview scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES]; //然后,自定义Cell,并对contentView顺时针旋转90° - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ static NSString *CellIdentifier = @"UITableViewCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (!cell) { cell = (UITableViewCell*)[[[NSBundle mainBundle] loadNibNamed:@"UITableViewCell" owner:nil options:nil] objectAtIndex:0]; cell.selectionStyle = UITableViewCellSelectionStyleNone; } [cell.contentView setTransform:CGAffineTransformMakeRotation(M_PI/2)]; return cell; }图例:横向内文页
0 0
- [IOS]UITableView横向滚动
- UITableView横向滚动
- UITableView横向滚动
- UITableView横向滚动
- UITableView 横向滚动(一)
- UITableView 横向滚动(二)
- 使用UITableview实现横向滚动
- UITableView 横向滚动(一)
- ios之UITableView设置横向
- iOS UITableView禁止滚动
- iOS之tableView横向滚动
- iOS UIScrollview 横向滚动 以及竖向滚动
- 用类似UITableView的方式实现横向滚动
- 横向滚动
- 横向滚动
- 横向滚动
- 横向滚动
- 横向滚动
- 下午天就是应该我在被窝里好好睡觉觉
- IplImage, CvMat, Mat 的关系和相互转换
- code Review
- struts2请求过程源码分析
- 用Httpclient做后台请求
- [IOS]UITableView横向滚动
- JBPM流程设计系列—入门简介
- Android 编程下两种方式注册广播的区别
- linux下执行定时任务
- Android自定义控件实战——水流波动效果的实现WaveView
- python学习笔记(4)-- 函数
- Unable to decode stream: java.io.FileNotFoundException: /android.graphics.Bitmap open failed: ENOEN
- zoj3813 线段树
- UVa10851 - 2D Hieroglyphs decoder(枚举)