Skip to content

Commit 8142e56

Browse files
committed
Decided to signal end of bodyText by adding ‘!!!’.
1 parent 01a41b6 commit 8142e56

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

TableViewCellWithAutoLayout/TableViewController/RJModel.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ - (NSString *)randomLorumIpsum {
5050
int r = arc4random() % [lorumIpsumArray count];
5151
NSArray *lorumIpsumRandom = [lorumIpsumArray objectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, r)]];
5252

53-
// Array to string. Adding <START> <END> tags to ensure all text visible.
53+
// Array to string. Adding '!!!' to end of string to ensure all text is visible.
5454
//
55-
return [NSString stringWithFormat:@"<START>%@<END>", [lorumIpsumRandom componentsJoinedByString:@" "]];
55+
return [NSString stringWithFormat:@"%@!!!", [lorumIpsumRandom componentsJoinedByString:@" "]];
5656

5757
}
5858

TableViewCellWithAutoLayout/TableViewController/RJTableViewController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
111111
// Make sure the cell has constraints setup before asking it to layout
112112
[cell setNeedsUpdateConstraints];
113113
[cell updateConstraintsIfNeeded];
114-
115114
[cell.contentView setNeedsLayout];
116115
[cell.contentView layoutIfNeeded];
116+
117117
CGFloat height = [cell.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;
118118

119119
NSLog(@"My returned height = %f", height);

0 commit comments

Comments
 (0)