controller reference updated for getting correct width

This commit is contained in:
Murugan, Vimal 2019-09-05 18:53:18 +05:30
parent e5a66dc1a3
commit a3e60ef4ac
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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 {