diff --git a/Example/AttributedTableViewCell.m b/Example/AttributedTableViewCell.m index 56679801..9cfd8793 100644 --- a/Example/AttributedTableViewCell.m +++ b/Example/AttributedTableViewCell.m @@ -141,7 +141,7 @@ + (CGFloat)heightForCellWithText:(NSString *)text availableWidth:(CGFloat)availa static CGFloat padding = 10.0; UIFont *systemFont = [UIFont systemFontOfSize:kEspressoDescriptionTextFontSize]; - CGSize textSize = CGSizeMake(availableWidth - (2 * padding), CGFLOAT_MAX); + CGSize textSize = CGSizeMake(availableWidth - (2 * padding) - 26, CGFLOAT_MAX); // rough accessory size CGSize sizeWithFont = [text sizeWithFont:systemFont constrainedToSize:textSize lineBreakMode:NSLineBreakByWordWrapping]; #if defined(__LP64__) && __LP64__ diff --git a/Example/RootViewController.m b/Example/RootViewController.m index d6573782..3b038e5c 100644 --- a/Example/RootViewController.m +++ b/Example/RootViewController.m @@ -60,7 +60,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(__unused NSIndexPath *)indexPath { return [AttributedTableViewCell heightForCellWithText:[self.espressos objectAtIndex:(NSUInteger)indexPath.row] - availableWidth:CGRectGetWidth(tableView.frame) - 26]; // rough accessory size + availableWidth:CGRectGetWidth(tableView.frame)]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {