From e5a66dc1a3e652dca7572f7cbf0dcba65d499b43 Mon Sep 17 00:00:00 2001 From: "Murugan, Vimal" Date: Thu, 5 Sep 2019 14:53:42 +0530 Subject: [PATCH 1/4] width update for calculate correct height --- .../TopLabelsAndBottomButtonsTableViewController.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m index ca75b778..a2e66bc7 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m @@ -289,8 +289,7 @@ UIView *headerView = self.headerView; UIView *tableHeader = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 0)]; - [MVMCoreUIUtility sizeViewToFit:headerView]; - + [MVMCoreUIUtility sizeViewToFit:headerView forWidth:[NSNumber numberWithFloat:[MVMCoreUISplitViewController getDetailViewWidth]]]; CGRect frame = tableHeader.frame; frame.size.height = CGRectGetHeight(headerView.frame); tableHeader.frame = frame; From a3e60ef4ac9f88aee52a7b4dcb673d58ace6d6ba Mon Sep 17 00:00:00 2001 From: "Murugan, Vimal" Date: Thu, 5 Sep 2019 18:53:18 +0530 Subject: [PATCH 2/4] controller reference updated for getting correct width --- .../TopLabelsAndBottomButtonsTableViewController.m | 2 +- MVMCoreUI/Utility/MVMCoreUIUtility.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m index a2e66bc7..8862170b 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m @@ -289,7 +289,7 @@ UIView *headerView = self.headerView; UIView *tableHeader = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 0)]; - [MVMCoreUIUtility sizeViewToFit:headerView forWidth:[NSNumber numberWithFloat:[MVMCoreUISplitViewController getDetailViewWidth]]]; + [MVMCoreUIUtility sizeViewToFit:headerView]; CGRect frame = tableHeader.frame; frame.size.height = CGRectGetHeight(headerView.frame); tableHeader.frame = frame; diff --git a/MVMCoreUI/Utility/MVMCoreUIUtility.m b/MVMCoreUI/Utility/MVMCoreUIUtility.m index e8523a61..4f150783 100644 --- a/MVMCoreUI/Utility/MVMCoreUIUtility.m +++ b/MVMCoreUI/Utility/MVMCoreUIUtility.m @@ -119,7 +119,7 @@ #pragma mark - Sizing + (CGFloat)getWidth { - UIViewController *controller = [MVMCoreUISession sharedGlobal].splitViewController ?: [MVMCoreUISession sharedGlobal].navigationController; + UIViewController *controller = [MVMCoreUISession sharedGlobal].splitViewController.navigationController ?: [MVMCoreUISession sharedGlobal].navigationController; if (controller) { return CGRectGetWidth(controller.view.bounds); } else { From 11db27de8853f277d356e879e97bd9cd7b7fc2f0 Mon Sep 17 00:00:00 2001 From: "Murugan, Vimal" Date: Thu, 5 Sep 2019 18:54:35 +0530 Subject: [PATCH 3/4] space updated --- .../TopLabelsAndBottomButtonsTableViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m index 8862170b..f48a7fd9 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m @@ -290,6 +290,7 @@ UIView *headerView = self.headerView; UIView *tableHeader = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 0)]; [MVMCoreUIUtility sizeViewToFit:headerView]; + CGRect frame = tableHeader.frame; frame.size.height = CGRectGetHeight(headerView.frame); tableHeader.frame = frame; From 63322a7d24a241ea05781e1ebd354b3819742fbf Mon Sep 17 00:00:00 2001 From: "Murugan, Vimal" Date: Thu, 5 Sep 2019 19:00:07 +0530 Subject: [PATCH 4/4] updated the file --- .../TopLabelsAndBottomButtonsTableViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m index f48a7fd9..ca75b778 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsTableViewController.m @@ -289,8 +289,8 @@ UIView *headerView = self.headerView; UIView *tableHeader = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 0)]; - [MVMCoreUIUtility sizeViewToFit:headerView]; - + [MVMCoreUIUtility sizeViewToFit:headerView]; + CGRect frame = tableHeader.frame; frame.size.height = CGRectGetHeight(headerView.frame); tableHeader.frame = frame;