I have a design issue with grouped uitableview, I add uiviews to the leftmost side of each cell extending little over the cell bounds and I want them to be clipped. But neither setting clip subviews in IB nor setting clipsToBounds property in code didn't help.
So far I have set clipsToBounds (for both uitableview itself and individual uitabviewcells) in a number of places but none helped:
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
...
[cell setClipsToBounds:TRUE];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:defaultIdentifier];
if (cell == nil)
{
cell = [self reuseTableViewCellWithIdentifier:defaultIdentifier withIndexPath:indexPath];
}
...
[cell setClipsToBounds:TRUE];
...
return cell;
}
- (void)viewDidLoad
{
...
[mainTableView setClipsToBounds:TRUE];
}
Is it possible without changing tableview style to plain?