title: iOS: Make a circle with background color like the iPhone calendar list
body: <p>I'm trying to add a circle to the left on my table cells however can't figure out the best way to do it. I tried adding</p>
  
  <pre><code>CGContextRef context= UIGraphicsGetCurrentContext();
  
  CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor);
  CGContextSetAlpha(context, 0.5);
  CGContextFillEllipseInRect(context, CGRectMake(10.0, 10.0, 10.0, 10.0));
  
  CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);
  CGContextStrokeEllipseInRect(context, CGRectMake(10.0, 10.0, 10.0, 10.0));
  </code></pre>
  
  <p>to my cellForRowAtIndexPath but kept getting invalid context errors. Here is my cellForRowAtIndexPath.</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"AppointmentCell";
      NSDictionary *appointment = [[self.appointments objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      int minutes = (int)[[NSString stringWithFormat:@"%@", [appointment objectForKey:@"start_time"]] integerValue];
  
      if (cell == nil) {
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
      }
  
      NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
      [dateFormatter setDateFormat:@"h:mma"];
      [dateFormatter setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]];
      NSDate *midnight = [NSDate dateWithTimeIntervalSince1970:0];
      NSDate *newDate = [midnight dateByAddingTimeInterval:minutes*60];
  
      NSString *newTime = [dateFormatter stringFromDate:newDate];
      dateFormatter = nil;
  
      cell.textLabel.text = newTime;
      cell.detailTextLabel.textAlignment = UITextAlignmentCenter;
      cell.detailTextLabel.text = [appointment objectForKey:@"reason"];
  
      return cell;
  }
  </code></pre>
  
  <p>How would I add the circle with a color just like the iPhone's Calendar list view?</p>