I\'d like to have a tableview border styled like this one,only the left side is colored.
Any ideas?
The easiest way I can think of is to add a little view in the content view:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
//Just a small view
UIView *lineView=[[UIView alloc] initWithFrame:CGRectMake(X_POS, Y_POS, LINE_WIDTH, CELL_HEIGHT)];
[lineView setBackgroundColor:[UIColor redColor]];
[[cell contentView] addSubview:lineView];
[lineView release];
}
return cell;
}