Commit graph

6 commits

Author SHA1 Message Date
Sven Bacia
ce4b851da3 Support cells created from nibs
Summary:
I started working on adding support for dequeuing cells created from nibs (issue #1). Additionally I extended `IGListSingleSectionController` so that it can be used with nibs too. I don't know if you had this also in mind.

- [x]  I'm currently thinking about the best way to test these changes.
- [x] I was not able to update the documentation (issue #55).

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/56

Reviewed By: dshahidehpour

Differential Revision: D4023746

Pulled By: rnystrom

fbshipit-source-id: 6a8b4cfb4dba38ea6e9870a9a4506288ee155cfe
2016-10-14 18:59:18 -07:00
Valeriy Van
d3442ec497 Simplifies block ridding of one if-else branch met only once.
Summary:
Simplifies block ridding of one if-else branch met only once.
Solves issue #68.

- [*] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [*] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/69

Reviewed By: jessesquires

Differential Revision: D4021608

Pulled By: rnystrom

fbshipit-source-id: 21cfca8578398c819a68aa3a118d27d58bb580b3
2016-10-14 11:29:11 -07:00
Ryan Nystrom
394760081c Add isLast/FirstSection API to IGListSectionController
Summary: Product needs show that section controllers need some sort of awarenes when they are the first/last section in a list (e.g. for cell borders). Adding this simple API, non-breaking.

Reviewed By: jessesquires

Differential Revision: D4016023

fbshipit-source-id: c75f9298fc73875a1cabad191fe2db6cb9ee4376
2016-10-13 12:44:12 -07:00
Ben Asher
992c3b7caa IGListAdapter: Fix not returning early when collectionView/dataSource is nil and completion is nil
Summary:
- I ran the static analyzer, and it found a case in `performUpdatesAnimated:completion:` where it looks like we meant to bail out early if the `collectionView` or `dataSource` is nil, but it only does so if `completion` is provided.
- Fixed a spelling error in nearby documentation

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)

- There is one other analyzer warning, but it seems to be making an incorrect assumption. In any case, it's not something I can fix quickly (requires more time spent staring at IGListDiff.mm).
- A ticket should be opened to add static analysis to .travis.yml. I'lll do this soonish, unless someone beats me to it!

- I could add a test for this, but this project is annotated well enough with null
Closes https://github.com/Instagram/IGListKit/pull/51

Reviewed By: ocrickard

Differential Revision: D4008605

Pulled By: rnystrom

fbshipit-source-id: c2b7516cb8c1fc619aa63d1e9b0c26f2918cd8a1
2016-10-12 09:29:11 -07:00
Kyle Hickinson
a2e0005357 Replace reusable identifier methods with a C function (#40)
Summary:
Replaced the two methods for generating a reusable identifier with an inline C function (as per #40) which has 3 parameters: `viewClass` (unchanged), `nibName` (for when #1 is added), and `kind`. The string is generated following the same pattern as before.

A few things:
- The current test only tests one of the options. May want to add more tests for each.
- Not sure if you guys prefer `NS_INLINE` vs `static inline`.
- Not sure if we want to add assertions for empty strings for nibName/kind parameters.

- [x] All tests pass. Demo project builds and runs.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/49

Differential Revision: D4005549

Pulled By: jessesquires

fbshipit-source-id: e1683ebe8882d1a8de934c8166f67d3508cffba9
2016-10-11 17:59:08 -07:00
FBShipIt
cdc796746a Initial commit
fbshipit-source-id: c38b897b9e2b87c782e0e01b0145d9189dc7f9d8
2016-10-11 10:12:17 -04:00