Permalink
Browse files

Fix cell editor minor issue on retina display

Cell editor was placed 0.5 pixels below the right location
  • Loading branch information...
jlopez committed Sep 2, 2010
1 parent 5f4726a commit 4c98373fa412150b54ca958b32ecc564356154f7
Showing with 3 additions and 1 deletion.
  1. +3 −1 JLCellEditor.m
View
@@ -42,7 +42,9 @@ - (void)editCellAtIndexPath:(NSIndexPath *)indexPath {
CGRect leftLabelFrame = cell.textLabel.frame;
CGRect frame = label.frame;
CGFloat x = leftLabelFrame.origin.x + leftLabelFrame.size.width;
- textView.frame = CGRectMake(x, frame.origin.y - 8,
+ CGFloat scale = [[UIScreen mainScreen] scale];
+ CGFloat dy = floorf(8.5 * scale) / scale;
+ textView.frame = CGRectMake(x, frame.origin.y - dy,
frame.origin.x - 8 + frame.size.width + 16 - x,
frame.size.height + 16);
textView.text = label.text;

0 comments on commit 4c98373

Please sign in to comment.