Reputation: 115422
I have a grouped UITableView
that contains two cells. I've set a custom separatorColor
for the table view, but would like to get rid of the internal separator in between the two cells, so that it looks like one cell. I want to keep the external separator around the edge of the cells.
What I have now:
What I'd like to achieve:
Is this possible? My project is targetting iOS 5.0 and above. Thanks in advance.
Upvotes: 2
Views: 1576
Reputation: 139
Does this have to be a dynamic table? you mentioned that it only has two cells.. perhaps you could look at making the table/section one cell with a larger row height? or perhaps not put it in a table at all? instead use a UIView:
#import <QuartzCore/QuartzCore.h>
-(void)viewDidLoad
{
[myview.layer setBorderWidth:1];
[myview.layer setBorderColor:[[UIColor lightGrayColor] CGColor]];
[myView.layer setCornerRadius:20];
}
the above code will give you the rounded corners on any view you desire just swap out themyview
variable.
Upvotes: 1
Reputation: 6166
Try Adding
[self.tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
or U can add
UIView *backgroundVie = [[UIView alloc] init];
backgroundVie.backgroundColor = [UIColor clearColor];
cell.backgroundView=backgroundVie ;
Upvotes: -1
Reputation: 1706
Try changing separator style of the table view too.
tableView.separatorColor = [UIColor clearColor];
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
Upvotes: 3