From 9f8136c73fbdf86876018bb52f964778f36e2ca6 Mon Sep 17 00:00:00 2001 From: davdroman Date: Fri, 4 Sep 2015 06:20:47 +0200 Subject: [PATCH] 3.0.0-rc.1 release --- Bohr.podspec | 2 +- Bohr/BOTableViewController.m | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Bohr.podspec b/Bohr.podspec index d5bc836..5374618 100755 --- a/Bohr.podspec +++ b/Bohr.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Bohr" - s.version = "3.0.0-alpha.5" + s.version = "3.0.0-rc.1" s.summary = "Settings screen composing framework" s.homepage = "https://github.com/DavdRoman/Bohr" s.author = { "David Román" => "d@vidroman.me" } diff --git a/Bohr/BOTableViewController.m b/Bohr/BOTableViewController.m index 1ffe67c..9632cca 100644 --- a/Bohr/BOTableViewController.m +++ b/Bohr/BOTableViewController.m @@ -111,18 +111,19 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa return cellHeight; } -- (CGFloat)heightForCell:(UITableViewCell *)cell { +- (CGFloat)heightForCell:(BOTableViewCell *)cell { - UITableViewCell *cleanCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; - cleanCell.frame = CGRectMake(0, 0, cell.frame.size.width, 0); - cleanCell.textLabel.numberOfLines = 0; - cleanCell.textLabel.text = cell.textLabel.text; - cleanCell.accessoryView = cell.accessoryView; - cleanCell.accessoryType = cell.accessoryType; - - CGFloat height = [cleanCell systemLayoutSizeFittingSize:cleanCell.frame.size].height; + if ([cell expansionHeight] > 0) { + UITableViewCell *cleanCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil]; + cleanCell.frame = CGRectMake(0, 0, cell.frame.size.width, 0); + cleanCell.textLabel.numberOfLines = 0; + cleanCell.textLabel.text = cell.textLabel.text; + cleanCell.accessoryView = cell.accessoryView; + cleanCell.accessoryType = cell.accessoryType; + return [cleanCell systemLayoutSizeFittingSize:cleanCell.frame.size].height; + } - return height; + return [cell systemLayoutSizeFittingSize:cell.frame.size].height; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {