写真に見られるように、私は tableView ( tableviewController のビュー) を持っています。青いビューはセクションの headerView です。タップすると、いくつかのセルが折りたたまれますが、私の問題は、セルに backGround の最初の部分があることです背景としてのtableView(クラウド)の[この写真では、セルのbackgroundColorをクリアに設定しますが、色を設定すると、左右(写真のLR)の部分がまだそこにあります]
私は試してみます: cell.layer.masksToBounds = YES; および cell.contentView.layer.masksToBounds = YES;
どうすればそれを解決できますか? セルが tableView BackGroundColor [image] の最初の部分を BackGroundColor として取るのはなぜですか?
編集:いくつかのコード(backGroundのようにStoryBoardのすべての値を上書きしています...)
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"clientCell";
ClientCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if ([[[[[[DataManager sharedManager] clientsList] objectAtIndex:indexPath.section] objectForKey:@"rewards"] objectAtIndex:indexPath.row] valueForKey:@"description"] != [NSNull null])
{
cell.voucherDescription.text = [[[[[[DataManager sharedManager] clientsList] objectAtIndex:indexPath.section] objectForKey:@"rewards"] objectAtIndex:indexPath.row] valueForKey:@"description"];
}
//configure more labels ..
[cell setBackgroundColor:[UIColor clearColor]];
[cell.voucherDescription setFont:[UIFont fontWithName:SharkFontSystemeName size:17]];
return cell;
}
viewDidLoad で:
[self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg.png"]]];