ОБНОВЛЕНО
Ваш код для рендеринга круга в порядке, вам просто нужно поместить его в подкласс UIView, чтобы он работал правильно.
@interface CircleView : UIView{
}
@implementation CircleView{
- (void)drawRect:(CGRect)rect{
CGContextRef context= UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor);
CGContextSetAlpha(context, 0.5);
CGContextFillEllipseInRect(context, CGRectMake(0,0,self.frame.size.width,self.frame.size.height));
CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
CGContextStrokeEllipseInRect(context, CGRectMake(0,0,self.frame.size.width,self.frame.size.height));
}
}
Затем вы можете добавить круговое представление к ячейке таблицы,
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
//...
//Your existing code
CGRect positionFrame = CGRectMake(10,10,10,10);
CircleView * circleView = [[CircleView alloc] initWithFrame:positionFrame];
[cell.contentView addSubview:circleView];
[circleView release];
return cell;
}
Поиграйте с рамкой позиции, пока она не будет соответствовать тому, что вам нужно.