TableViewCell圆角

TableViewCell圆角

920 发布: 2024/9/14 13:56 本文总阅读量
圆角
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
    if ((indexPath.row+1) == _activeList.count) {
        cell.layer.masksToBounds = YES;
        cell.layer.cornerRadius = 8.0;
        cell.layer.maskedCorners = kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner;
    }else {
        cell.layer.cornerRadius = 0.0;
    }
}