Commit 72758d92 authored by David Jean's avatar David Jean Committed by Commit Bot

[ios] Make “Choose folder” respect dynamic type

Image: https://drive.google.com/open?id=1fxpVgLqHb4-5oUCU1pMVJbGjUhrheQSf
On 10.3.1: https://drive.google.com/open?id=1xaO4Ja8WZbvjRvT1lQXccBkTfBFiECqE

Bug: 891279
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: I13ac8525ebc6108f0e2e064c424d7e8762435694
Reviewed-on: https://chromium-review.googlesource.com/c/1257792
Commit-Queue: David Jean <djean@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596539}
parent 58a46564
......@@ -27,8 +27,8 @@
namespace {
// The height of every folder cell.
const CGFloat kFolderCellHeight = 48.0;
// The estimated height of every folder cell.
const CGFloat kEstimatedFolderCellHeight = 48.0;
// Height of section headers/footers.
const CGFloat kSectionHeaderHeight = 8.0;
......@@ -177,6 +177,9 @@ using bookmarks::BookmarkNode;
// Add a tableFooterView in order to disable separators at the bottom of the
// tableView.
self.tableView.tableFooterView = [[UIView alloc] init];
self.tableView.estimatedRowHeight = kEstimatedFolderCellHeight;
self.tableView.rowHeight = UITableViewAutomaticDimension;
}
- (void)viewWillAppear:(BOOL)animated {
......@@ -203,11 +206,6 @@ using bookmarks::BookmarkNode;
#pragma mark - UITableViewDelegate
- (CGFloat)tableView:(UITableView*)tableView
heightForRowAtIndexPath:(NSIndexPath*)indexPath {
return kFolderCellHeight;
}
- (CGFloat)tableView:(UITableView*)tableView
heightForHeaderInSection:(NSInteger)section {
return kSectionHeaderHeight;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment