Skip to content

Commit 71c31cb

Browse files
committed
fixup: workaround
On iPod Touch sim (no top safe are except status bar, no bottom safe area) CGRectGetMaxY(navCtrl.navigationBar.frame) misses the status bar. So, keep the old style way of statusbar height + navbar height.
1 parent 13b7594 commit 71c31cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

XBMC Remote/Utilities.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,10 @@ + (CGFloat)getTopPadding {
10021002
}
10031003

10041004
+ (CGFloat)getTopPaddingWithNavBar:(UINavigationController*)navCtrl {
1005-
CGFloat topPadding = CGRectGetMaxY(navCtrl.navigationBar.frame);
1005+
CGFloat topPadding = UIApplication.sharedApplication.statusBarFrame.size.height + navCtrl.navigationBar.frame.size.height;
1006+
if ([self getBottomPadding]) {
1007+
topPadding = CGRectGetMaxY(navCtrl.navigationBar.frame);
1008+
}
10061009
return topPadding;
10071010
}
10081011

0 commit comments

Comments
 (0)