Skip to content

Commit

Permalink
Merge pull request #235 from ndleon09/master
Browse files Browse the repository at this point in the history
Fix RETableViewSection maximumTitleWidthWithFont
  • Loading branch information
XBeg9 committed Apr 25, 2016
2 parents a448345 + 51ff279 commit 1c71a41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions RETableViewManager/RETableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ - (void)layoutSubviews

// Set content frame
//
CGRect contentFrame = self.contentView.frame;
CGRect contentFrame = self.contentView.bounds;
contentFrame.origin.x = contentFrame.origin.x + self.section.style.contentViewMargin;
contentFrame.size.width = contentFrame.size.width - self.section.style.contentViewMargin * 2;
self.contentView.frame = contentFrame;
self.contentView.bounds = contentFrame;

// iOS 7 textLabel margin fix
//
Expand Down
2 changes: 1 addition & 1 deletion RETableViewManager/RETableViewSection.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ - (CGFloat)maximumTitleWidthWithFont:(UIFont *)font
{
CGFloat width = 0;
for (RETableViewItem *item in self.mutableItems) {
if ([item isKindOfClass:[RETextItem class]] || [item isKindOfClass:[REDateTimeItem class]] || [item isKindOfClass:[RERadioItem class]] || [item isKindOfClass:[REMultipleChoiceItem class]] || [item isKindOfClass:[RENumberItem class]]) {
if ([item isKindOfClass:[RETextItem class]] || [item isKindOfClass:[REDateTimeItem class]] || [item isKindOfClass:[RERadioItem class]] || [item isKindOfClass:[REMultipleChoiceItem class]] || [item isKindOfClass:[RENumberItem class]] || [item isKindOfClass:[REPickerItem class]]) {
CGSize size = [item.title re_sizeWithFont:font];
width = MAX(width, size.width);
}
Expand Down

0 comments on commit 1c71a41

Please sign in to comment.