diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2017-09-03 20:27:35 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2017-09-03 20:27:35 +0300 |
commit | 01ac79d7a368bcc46656380f7f5fc8e1853a49e0 (patch) | |
tree | 64b1970ef1bc48a477483557182d8dda2db64375 | |
parent | c2ee0200c70f107a7201680388edcfd7ee0c7b2b (diff) |
MUCertificateViewController: auto-size table view cells.
-rw-r--r-- | Source/Classes/MUCertificateViewController.m | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/Classes/MUCertificateViewController.m b/Source/Classes/MUCertificateViewController.m index 89cd7e3..3809b6d 100644 --- a/Source/Classes/MUCertificateViewController.m +++ b/Source/Classes/MUCertificateViewController.m @@ -88,6 +88,9 @@ static const NSUInteger CertificateViewSectionTotal = 4; - (void) viewDidLoad { [self setTitle:_certTitle]; + + [[self tableView] setRowHeight:UITableViewAutomaticDimension]; + [[self tableView] setEstimatedRowHeight:44.0f]; } - (void) viewWillAppear:(BOOL)animated { @@ -321,15 +324,6 @@ static const NSUInteger CertificateViewSectionTotal = 4; return cell; } -- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - if ([indexPath section] == CertificateViewSectionSHA1Fingerprint) { - return 55.0f; - } else if ([indexPath section] == CertificateViewSectionSHA256Fingerprint) { - return 88.0f; - } - return 44.0f; -} - #pragma mark - #pragma mark Table view delegate |