Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Source/Cells/Popover/FORMFieldValuesTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ - (void)viewDidLoad {

self.clearsSelectionOnViewWillAppear = NO;

self.tableView.rowHeight = FORMFieldValuesCellHeight;
//Make the rowheight estimated to make the height dynamic
self.tableView.estimatedRowHeight = FORMFieldValuesCellHeight;

[self.tableView registerClass:[FORMFieldValueCell class] forCellReuseIdentifier:FORMFieldValueCellIdentifer];
[self.tableView registerClass:[FORMFieldValuesTableViewHeader class] forHeaderFooterViewReuseIdentifier:FORMFieldValuesTableViewHeaderIdentifier];
Expand Down Expand Up @@ -89,6 +90,9 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
FORMFieldValue *fieldValue = self.values[indexPath.row];
cell.fieldValue = fieldValue;

// By setting the number of lines to 0, we tell the label to resize automatically
cell.textLabel.numberOfLines = 0;

if ([self.field.value isKindOfClass:[FORMFieldValue class]]) {
FORMFieldValue *currentFieldValue = self.field.value;

Expand Down