Reputation: 2448
Has anyone seen a snippet (or class/library) that will draw that corner triangle in a tableview cell (see below image).
Upvotes: 6
Views: 562
Reputation: 11827
it's built in UITableViewCell
... Simple ..
cell.accessoryType = UITableViewCellAccessoryType.disclosureIndicator
Upvotes: 0
Reputation: 4424
You can create a new view from an image and then add it to the cell calling addSubview. Here is a example setting the corner upon launch:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
CGRect cornerFrame = CGRectMake(x, y, width, height);
UIImageView * corner = [[UIImageView alloc] initWithFrame:cornerFrame];
[corner setImage:[UIImage imageNamed:@"corner.jpg"]];
[cell.contentView addSubview:corner];
}
return cell;
}
Upvotes: 4
Reputation: 28688
Its probably just an image in the cell. Nothing too fancy, just your standard run of the mill custom UITableViewCell
Upvotes: 0