Skip to content

Commit 0f32dbd

Browse files
committed
fixup: change getTopPaddingWithNavBar to be able to remove workaround
1 parent 60090de commit 0f32dbd

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

XBMC Remote/DetailViewController.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,9 +2171,7 @@ - (void)choseParams {
21712171
#pragma mark - Table Management
21722172

21732173
- (CGFloat)getTableInsetTop {
2174-
// Workaround: -1.0 to avoid empty space between collection view's section header and navbar, which
2175-
// happens for some devices where maxY of navigation bar is not identical to getTopPaddingWithNavBar.
2176-
return IS_IPHONE ? [Utilities getTopPaddingWithNavBar:self.navigationController] - 1.0 : 0;
2174+
return IS_IPHONE ? [Utilities getTopPaddingWithNavBar:self.navigationController] : 0;
21772175
}
21782176

21792177
- (void)setSearchBar:(UISearchBar*)searchBar toDark:(BOOL)isDark {

XBMC Remote/Utilities.m

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

10041004
+ (CGFloat)getTopPaddingWithNavBar:(UINavigationController*)navCtrl {
1005-
CGFloat topPadding = UIApplication.sharedApplication.statusBarFrame.size.height + navCtrl.navigationBar.frame.size.height;
1005+
CGFloat topPadding = CGRectGetMaxY(navCtrl.navigationBar.frame);
10061006
return topPadding;
10071007
}
10081008

0 commit comments

Comments
 (0)