//
// BMViewController.m
// UITableViewTest
//
// Created by wangbaoxiang on 13-4-23.
// Copyright (c) 2013年 apple. All rights reserved.
//
#import "BMViewController.h"
@interfaceBMViewController ()
@end
@implementation BMViewController
- (void)viewDidLoad
{
[superviewDidLoad];
UITableView *table = [[UITableView alloc] initWithFrame:CGRectMake(0, 60, 60, 480)];
table.backgroundColor = [UIColorwhiteColor];
[table.layersetAnchorPoint:CGPointMake(0.0, 0.0)];
table.transform = CGAffineTransformMakeRotation(M_PI/-2);
table.showsVerticalScrollIndicator = NO;
table.frame = CGRectMake(0, 60, 320, 60);
table.rowHeight = 60.0;
NSLog(@"%f,%f,%f,%f",table.frame.origin.x,table.frame.origin.y,table.frame.size.width,table.frame.size.height);
table.delegate = self;
table.dataSource = self;
[self.view addSubview:table];
[table release];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 16;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCellalloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleGray;
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.textLabel.backgroundColor = [UIColorredColor];
cell.textLabel.transform = CGAffineTransformMakeRotation(M_PI/2);
}
cell.textLabel.text = [NSString stringWithFormat:@"%d",indexPath.row];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSLog(@"--------->%d",indexPath.row);
}
- (void)didReceiveMemoryWarning
{
[superdidReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
相关推荐
水平tableView
swift ,使用autolayout + storyboard 最外层tableview列表,cell里面嵌套了tableview,自适应内容,cell里的tableview不可滑动,内容全部显示,且文字分行显示,不用设置cell的高度直接可以自适应内容
多个tableView嵌套 滑动上一个tableView停留,接着滑动下一个tableView
tableView展开
TableView 解析城市列表 数据来源:Plist文件
swift 下拉刷新 tableview
qt Tableview显示数据
一个看起来像TableView的RecyclerView,可以同时水平和垂直滚动一个固定的标题
这个demo实现了TableViewSection的展开隐藏功能,欢迎下载使用。
Tableview测试
swift tableview cell展开/折叠 填写信息, tableview自适应高度,tableview的cell嵌套tableview 自适应
iPhone tableview控件开发
javafx 2.0 tableview 实例 在此例子中有完整的tableview的使用
之前一直做Cocos2dx开发的TableView用得比较多,自己也扩展了一些功能,新公司用的Creator,所以翻译了个ts版本的,核心代码和函数名与cocos2dx的一致。 例子:...
TableView For Android TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells. TableView relies on a separate...
详细讲述了tableview表格的折叠编写
Qt Quick Control1中 从5.1版本开始就提供了表格控件,但是感觉不怎么好用,在Qt Quick Control2中 5.12版本开始又提供了一个专门用于做表格的控件TableView,相比于前面的方案,使用Tableview更加简单和直接。...
Unity GUI 模仿IOS TableView代码结构的编辑器滑动选择窗口
通过自定义tableView的组标题视图实现tableView的折叠效果
tableView多选 .