默认的UITableViewStyleGrouped是圆角:
如果需要改成直角,修改- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath即可。
1 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 2 cell.textLabel.backgroundColor = [UIColor clearColor]; 3 UIImageView *imgView = [[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 44)] autorelease]; 4 //cellBg为Cell的背景图片文件名称 5 imgView.image = [UIImage imageNamed:@"cellBg"]; 6 cell.backgroundView = imgView; 7 }
效果如图所示: