Skip to content

Commit

Permalink
Workaround for inconsistent left margins
Browse files Browse the repository at this point in the history
-[RETableView Cell layoutDetailView:minimumWidth:] does not account for the fact that -[UITableViewCell textLabel] has a different left margin on iPhone 4, iPhone 6+ and iPad.
  • Loading branch information
jlnr committed Apr 25, 2016
1 parent 5144f20 commit 90fb0b3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions RETableViewManager/RETableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,9 @@ - (void)layoutSubviews

- (void)layoutDetailView:(UIView *)view minimumWidth:(CGFloat)minimumWidth
{
CGFloat cellOffset = 10.0;
CGFloat cellOffset = self.textLabel.frame.origin.x;
CGFloat fieldOffset = 10.0;

if (self.section.style.contentViewMargin <= 0)
cellOffset += 5.0;

UIFont *font = self.textLabel.font;

CGRect frame = CGRectMake(0, self.textLabel.frame.origin.y, 0, self.textLabel.frame.size.height);
Expand Down

0 comments on commit 90fb0b3

Please sign in to comment.