iOS: Adjust page layout for AceViewController vs. MainViewController

This commit is contained in:
adnathan 2016-03-11 13:35:05 -08:00
Родитель 464f246de2
Коммит 76026fa05d
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -3,6 +3,7 @@
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#import "AceNavigationController.h"
#import "AceViewController.h"
#import "Utils.h"
@implementation AceNavigationController
@ -24,7 +25,13 @@
// Only resize to fullscreen if there's a single (non-TabBar) subview.
if (subviews.count == 1) {
((UIView*)subviews[0]).frame = [UIScreen mainScreen].bounds;
if ([self.topViewController isKindOfClass:[AceViewController class]]) {
((UIView*)subviews[0]).frame = [UIScreen mainScreen].bounds;
}
else {
// Adjustment for the default Cordova view controller
((UIView*)subviews[0]).frame = [UIScreen mainScreen].applicationFrame;
}
}
else if (subviews.count == 2) {
if ([subviews[0] isKindOfClass:[UITabBar class]]) {