• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Instagram / IGListKit / 2127
100%

Build:
DEFAULT BRANCH: master
Ran 09 Apr 2018 03:46PM UTC
Jobs 2
Files 99
Run time 13min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2127

push

travis-ci

facebook-github-bot
<a href="https://github.com/Instagram/IGListKit/commit/e49c94b25">Show header when section item is empty

Summary:
Issue fixed: #1117

I adding a new constructor for making a `IGListCollectionViewLayout` instance that can always show sticky header although section data is empty.

It&#39;s working well and [this is demo project](https://github.com/marcuswu0814/IGListKit_ShowStickyHeaderWhenDataEmpty).

Bug I&#39;m not sure is any good way to let this much more readability. Is there any good advice?

```objc
const CGRect headerBounds = (self.scrollDirection == UICollectionViewScrollDirectionVertical) ?
                CGRectMake(insets.left,
                        (itemCount == 0) ? CGRectGetMaxY(rollingSectionBounds) : CGRectGetMinY(rollingSectionBounds) - headerSize.height,
                        paddedLengthInFixedDirection,
                        headerSize.height) :
                CGRectMake((itemCount == 0) ? CGRectGetMaxX(rollingSectionBounds) : CGRectGetMinX(rollingSectionBounds) - headerSize.width,
                        insets.top,
                        headerSize.width,
                        paddedLengthInFixedDirection);
```

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn&#39;t tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/1129

Differential Revision: D7551628

Pulled By: rnystrom

fbshipit-source-id: </a><a class="double-link" href="https://github.com/Instagram/IGListKit/commit/a60b65a92">a60b65a92</a>

12605 of 13234 relevant lines covered (95.25%)

514.32 hits per line

Jobs
ID Job ID Ran Files Coverage
2 2127.2 (DESTINATION="OS=10.3.1,name=iPhone 7" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="NO" BUILD_EXAMPLE="YES" POD_LINT="NO", Gemfile) 09 Apr 2018 03:46PM UTC 0
95.24
Travis Job 2127.2
3 2127.3 (DESTINATION="OS=11.3,name=iPhone X" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" RUN_UI_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO", Gemfile) 09 Apr 2018 04:00PM UTC 0
95.24
Travis Job 2127.3
Source Files on build 2127
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2127
  • e49c94b2 on github
  • Prev Build on master (#2126)
  • Next Build on master (#2130)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc