mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-23 01:08:27 +00:00
Simplify header height check in layout
Summary: Issue fixed: # - [ ] All tests pass. Demo project builds and runs. - [ ] I added tests, an experiment, or detailed why my change isn't tested. - [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes. - [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md) Small changes Closes https://github.com/Instagram/IGListKit/pull/565 Differential Revision: D4728939 Pulled By: rnystrom fbshipit-source-id: 4f0c3455f55d4c267dffe5d7ebd37a96a648ec52
This commit is contained in:
parent
15f3c4b828
commit
bbd4738ca2
1 changed files with 2 additions and 4 deletions
|
|
@ -139,10 +139,8 @@ static void adjustZIndexForAttributes(UICollectionViewLayoutAttributes *attribut
|
|||
// do not add zero height headers or headers that are outside the rect
|
||||
const CGRect frame = attributes.frame;
|
||||
const CGRect intersection = CGRectIntersection(frame, rect);
|
||||
if (!CGRectIsEmpty(intersection) || CGRectGetHeight(frame) == 0.0) {
|
||||
if (CGRectGetHeight(frame) > 0.0) {
|
||||
[result addObject:attributes];
|
||||
}
|
||||
if (!CGRectIsEmpty(intersection) && CGRectGetHeight(frame) > 0.0) {
|
||||
[result addObject:attributes];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue