mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 02:52:45 +02:00
Prepare UX rework:
- enable the sticky headers in Rooms tab
This commit is contained in:
@@ -454,44 +454,6 @@
|
||||
sectionHeader.frame = frame;
|
||||
[self.stickyHeadersBottomContainer addSubview:sectionHeader];
|
||||
}
|
||||
|
||||
if (displayedSectionHeaders.count)
|
||||
{
|
||||
// Update the layout of the top sticky headers container
|
||||
sectionHeader = displayedSectionHeaders.firstObject;
|
||||
CGFloat containerHeight = 0;
|
||||
for (UIView *header in _stickyHeadersTopContainer.subviews)
|
||||
{
|
||||
if (header.tag < sectionHeader.tag)
|
||||
{
|
||||
containerHeight += header.frame.size.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
self.stickyHeadersTopContainerHeightConstraint.constant = containerHeight;
|
||||
|
||||
// Update the layout of the bottom sticky headers container
|
||||
sectionHeader = displayedSectionHeaders.lastObject;
|
||||
containerHeight = 0;
|
||||
CGRect bounds = self.stickyHeadersBottomContainer.frame;
|
||||
for (UIView *header in _stickyHeadersBottomContainer.subviews)
|
||||
{
|
||||
if (header.tag == sectionHeader.tag + 1)
|
||||
{
|
||||
bounds.origin.y = header.frame.origin.y;
|
||||
containerHeight = header.frame.size.height;
|
||||
}
|
||||
else if (header.tag > sectionHeader.tag + 1)
|
||||
{
|
||||
containerHeight += header.frame.size.height;
|
||||
}
|
||||
}
|
||||
self.stickyHeadersBottomContainerHeightConstraint.constant = containerHeight;
|
||||
self.stickyHeadersBottomContainer.bounds = bounds;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user