在UIView中添加表格
1、直接在Interface Builder中拖一个来就好了,然后绑定委托,数据
2、代码创建:
self.view = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
UITableView * table = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 100, 200) style:UITableViewStylePlain];
//可编辑
table.allowsSelectionDuringEditing = YES;
[self.view addSubview:table];