From a3e60ef4ac9f88aee52a7b4dcb673d58ace6d6ba Mon Sep 17 00:00:00 2001 From: "Murugan, Vimal" Date: Thu, 5 Sep 2019 18:53:18 +0530 Subject: [PATCH] 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 {