标签:
1 去除分割线
//去除分割线 self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
2 高度设置
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath]; return cell.frame.size.height; //自定义高度 // return 110; }
3 自定义Cell,后面会详细列出如何自定义cell,由于时间关系,这里暂时给出使用方法,如下:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { //MyCell是自己定义的Cell类 MyCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellIdentifier"]; if (!cell) { NSArray *objects = [[NSBundle mainBundle] loadNibNamed:@"MyCell" owner:self options:nil]; for (NSObject *o in objects) { if ([o isKindOfClass:[MyCell class]]) { cell = (MyCell *)o; break; } } } //Configure you cell //... return cell; }
3
标签:
原文地址:http://my.oschina.net/bingshanguxue/blog/360415