title: subclass uitableviewcell and override layoutsubviews
body: <p>I need to make cell selectionBackgroundView not on full width in plain UItableView. For this I made UItableViewCell subclass and override layoutsubviews method</p>
  
  <pre><code>- (void)layoutSubviews
  {
      [super layoutSubviews];
  
      self.selectedBackgroundView.frame = CGRectMake(self.frame.origin.x + 10.0f, self.frame.origin.y, self.frame.size.width - 20.0f, self.frame.size.height);
  
  }
  </code></pre>
  
  <p>My cellForRowAtIndexPath method looks like</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      NSString *identifier = [NSString stringWithFormat: @"CELL %i %i", indexPath.section, indexPath.row];
      GroupedTableCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
      if(cell == nil)
      {
          cell = [[GroupedTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
  
  
          UIView *cellBgView = [[UIView alloc] init];
          cellBgView.frame = CGRectMake(10, 0, 300, 80);
          [cellBgView setBackgroundColor:[UIColor colorWithRed:242 / 255.0 green:242 / 255.0 blue:242 / 255.0 alpha:1.0]];
          [cell.contentView addSubview:cellBgView];
      }
  
  
  
          [cell setBackgroundColor:[UIColor clearColor]];
      UIView *selectionView = [[UIView alloc] init];
      [selectionView setBackgroundColor:[UIColor colorWithRed:181 / 255.0 green:211 / 255.0 blue:53 / 255.0 alpha:1.0]];
      selectionView.frame = CGRectMake(10, 0, 300, 80);
      cell.selectedBackgroundView = selectionView;
      return cell;
  } 
  </code></pre>
  
  <p>But only for first row selectedView works correct. For other rows I have selectedView with clear color. Please, help me.</p>