Skip to content

Commit 3b76f42

Browse files
committed
Avoid gap between sticky header and navigation bar
1 parent d1cb62d commit 3b76f42

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

XBMC Remote/FloatingHeaderFlowLayout.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ - (NSArray*)layoutAttributesForElementsInRect:(CGRect)rect {
5353
CGFloat minY = CGRectGetMinY(attributesFirstItem.frame) - frame.size.height;
5454
CGFloat maxY = CGRectGetMaxY(attributesLastItem.frame) - frame.size.height;
5555
CGFloat posY = MIN(MAX(offset, minY), maxY);
56+
57+
// Workaround: Move up a little to leave no space between floating section header's top and navbar's bottom.
58+
// Only reason to keep this method implemented instead of simply using sectionHeadersPinToVisibleBounds = YES.
59+
posY -= 1.0 / UIScreen.mainScreen.scale;
60+
5661
frame.origin.y = posY;
5762
attributes.frame = frame;
5863
attributes.zIndex = 1024;

0 commit comments

Comments
 (0)