UITableViewStyleGrouped直角

默认的UITableViewStyleGrouped是圆角的



 

如果需要改成直角,修改- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath即可。

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    // code
    cell.textLabel.backgroundColor = [UIColor clearColor];
    UIImageView *imgView = [[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 44)] autorelease];
    imgView.image = [UIImage imageNamed:@"cellBg"];
    cell.backgroundView = imgView;
    // code    
}

  

猜你喜欢

转载自eric-gao.iteye.com/blog/1930751