UITableView横向滚动
来源:互联网 发布:js 分割字符串 编辑:程序博客网 时间:2024/05/18 01:37
1. UITableView 设置
CGRect tableViewRect = CGRectMake(0.0, 0.0, 50.0, 320.0);
self.tableView = [[UITableView alloc] initWithFrame:tableViewRect style:UITableViewStylePlain];
tableView.center = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height / 2);
tableView.delegate = self;
tableView.dataSource = self;
//tableview逆时针旋转90度。
tableView.transform = CGAffineTransformMakeRotation(-M_PI / 2);
// scrollbar 不显示
tableView.showsVerticalScrollIndicator = NO;
2. UITableViewCell 设置
- (UITableViewCell *)tableView :( UITableView *)aTableView cellForRowAtIndexPath :( NSIndexPath*)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"identifier"];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier@"identifier"] autorelease];
// cell顺时针旋转90度
cell.contentView.transform = CGAffineTransformMakeRotation(M_PI / 2);
}
return cell;
}
CGRect tableViewRect = CGRectMake(0.0, 0.0, 50.0, 320.0);
self.tableView = [[UITableView alloc] initWithFrame:tableViewRect style:UITableViewStylePlain];
tableView.center = CGPointMake(self.view.frame.size.width / 2, self.view.frame.size.height / 2);
tableView.delegate = self;
tableView.dataSource = self;
//tableview逆时针旋转90度。
tableView.transform = CGAffineTransformMakeRotation(-M_PI / 2);
// scrollbar 不显示
tableView.showsVerticalScrollIndicator = NO;
2. UITableViewCell 设置
- (UITableViewCell *)tableView :( UITableView *)aTableView cellForRowAtIndexPath :( NSIndexPath*)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"identifier"];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier@"identifier"] autorelease];
// cell顺时针旋转90度
cell.contentView.transform = CGAffineTransformMakeRotation(M_PI / 2);
}
return cell;
}
0 2
- UITableView横向滚动
- [IOS]UITableView横向滚动
- UITableView横向滚动
- UITableView横向滚动
- UITableView 横向滚动(一)
- UITableView 横向滚动(二)
- 使用UITableview实现横向滚动
- UITableView 横向滚动(一)
- 用类似UITableView的方式实现横向滚动
- 横向滚动
- 横向滚动
- 横向滚动
- 横向滚动
- 横向滚动
- 创建横向的UITableView
- 创建横向的UitableView
- 横向不间断滚动广告
- javascript横向连续滚动
- STM8的EEPROM解锁是可以重复进行的
- 想要成为富人所必须具备的特性
- Git 使用相关
- Java日志:迁移到 Logback 和 SLF4J
- Unity3D Update() 和 FixedUpdate()区别
- UITableView横向滚动
- C++内联函数
- 记录自己在centos虚拟机搭建简易git服务器的过程,分享给大家
- windows svn服务端搭建及eclipse集成svn
- 【模板】母函数(生成函数)
- 想要成为富人所必须具备的特性
- php常用正则过滤字符串代码
- lamp(Linux+Apache+MySQL+PHP)命令大全
- SVN版本控制初探