Commit graph

45 commits

Author SHA1 Message Date
Jesse Squires
ec1a46cdca Fix docs error
Summary:
😳
Closes https://github.com/Instagram/IGListKit/pull/301

Differential Revision: D4299155

Pulled By: rnystrom

fbshipit-source-id: 2bac6824a4d76401cb9eb61a582a734464f9d694
2016-12-08 07:14:04 -08:00
Jeff Bailey
80916636ec Fix for issue #294 - Support for UIAppearance in IGListCollectionView…
Summary:
Updated IGListCollectionView:initWithFrame:collectionViewLayout constructor to support UIAppearance for the backgroundColor property.

Fixes #294

- [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/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/298

Differential Revision: D4292394

Pulled By: rnystrom

fbshipit-source-id: a7c4f0e516728b684993f2651eadcc25001de783
2016-12-07 10:14:01 -08:00
Ryan Nystrom
e66bd85e32 Fix deselection from stack collection context offset
Summary:
Offset should be relative.

Fixes #279

- [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/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/295

Differential Revision: D4290143

Pulled By: rnystrom

fbshipit-source-id: 8d6dccb821b12700d0d7e8704006ef5371396dfd
2016-12-06 18:59:00 -08:00
Dave Caunt
394e6c827b Don't set UICollectionView properties in IGListCollectionView
Summary:
Fixes #277
Closes https://github.com/Instagram/IGListKit/pull/285

Differential Revision: D4284679

Pulled By: rnystrom

fbshipit-source-id: 6fae3bc928e0065681ebfce906f9e518f819db89
2016-12-06 06:44:05 -08:00
Ryan Nystrom
10bdfb23f9 Add more unit tests to stack section controller
Summary:
Beefing up our test coverage. Made an improvement to supplementary view behavior along the way. Will update `CHANGELOG.md` once travis finishes w/ link to PR #.

- [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/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/286

Differential Revision: D4281961

Pulled By: jessesquires

fbshipit-source-id: 32b5877bd72250b9a99e600ceffc64d686fa5651
2016-12-05 17:44:02 -08:00
Ryan Nystrom
7c3d4999eb Fix crash when reloading section that gets deleted
Summary: Rare, but very real crash that occurs when a reload is manually queued and then the section gets deleted in a diff.

Reviewed By: jeremycohen

Differential Revision: D4267678

fbshipit-source-id: a5bedf77934ff85f76830e3f0123a993fc5d885c
2016-12-05 11:58:58 -08:00
Brandon Everett
36363f42aa Create private method in IGListStackedSectionController to get relative index
Summary:
Fixes from PR #273 rebase.

jessesquires rnystrom this should look a little better and be able to merge.

- [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/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/275

Differential Revision: D4271440

Pulled By: rnystrom

fbshipit-source-id: a85b8c80b5504640d7f82b183ed5b5d0d0ea5c1b
2016-12-03 08:29:14 -08:00
Jesse Squires
e5afb5b4d0 Add scrolling method on IGListCollectionContext. Close #267
Summary:
- Add scrolling method on IGListCollectionContext so that section controllers can scroll to themselves.
- Update CHANGELOG.
- Other misc fixes.
- Closes #267 on GitHub.

Reviewed By: rnystrom

Differential Revision: D4261144

fbshipit-source-id: 9eed833cfff06107607bba01a0beee1d871497b6
2016-12-01 16:14:04 -08:00
Ryan Nystrom
ca15e29cf1 Skip reloading objects that are not found
Summary:
Even with the assert, we will add `NSNotFound` to the set which will crash. Instead, skip adding the value in case a consumer is using a reference to an object that doesn't exist anymore.

Also, should be using `continue` if a section controller isn't returned by the data source.

Reviewed By: jessesquires

Differential Revision: D4226771

fbshipit-source-id: ed6df0992fdef611dd8fae64f4716e296df11f9a
2016-11-23 16:28:58 -08:00
Jesse Squires
acd3ea217e Cleanup layout
Summary:
Replaces #243

---------------------

- Clean up GridLayout + docs
- Remove GridLayout scroll direction, not used/supported?
- Fix some file target membership issues
- Add GridLayout to umbrella header
- "Sort by name" on xcode project directories
- crtl-I auto format in xcode
- re-gen docs
Closes https://github.com/Instagram/IGListKit/pull/246

Differential Revision: D4219028

Pulled By: jessesquires

fbshipit-source-id: 02d6d284c47dd4301549d9094727054156d596aa
2016-11-21 23:28:58 -08:00
Ryan Nystrom
316fbe2b8b Remove NSObject+IGListDiffable category
Summary: Removing the category entirely (recreated for unit tests and examples). Went through and updated all of Instagram so we don't rely on the category and found a few models that needed cleaning up.

Reviewed By: jessesquires

Differential Revision: D4206552

fbshipit-source-id: ee8147e8872ea19f6c8bd8072df61eed5bffb6f3
2016-11-21 16:59:00 -08:00
Jesse Squires
cb45684e4d Regen docs for 2.0 release. Close #181
Summary:
Closes #181
Closes https://github.com/Instagram/IGListKit/pull/207

Differential Revision: D4216383

Pulled By: jessesquires

fbshipit-source-id: 664c6d0f1cf82647cf8e2231cf35348b08351c9d
2016-11-21 15:44:01 -08:00
Bofei Zhu
1d3e58b9fd Create a grid layout for IGList
Summary:
Rebase from #140:

Create a flow layout for IGList that does not newline sections. Closes #3

- [x] Minimum inter-item spacing
- [x] Minimum line spacing
- [x] Constant item size with constant layout time
- [x] Update layout on insert/delete/move
- [x] Unit Test
Closes https://github.com/Instagram/IGListKit/pull/225

Differential Revision: D4211469

Pulled By: rnystrom

fbshipit-source-id: f4710dbf195701098ac50f94b6b2aa8c801b2a83
2016-11-21 13:29:04 -08:00
Anton Sotkov
4f97e58162 Fixed set creation in batch update index path results
Summary:
3 variables were meant to be sets but were initialized as arrays, as discussed in #232. Corrected initialization to match definitions.

- [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/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/233

Differential Revision: D4213541

Pulled By: jessesquires

fbshipit-source-id: 5b2528d683bd6a2358fd8a1ff4e5fec58f4a59b1
2016-11-21 10:29:04 -08:00
Anton Sotkov
c48a39aefe Update documentation for diff
Summary:
Update documentation for diff to be in sync with ab890fc607. Documentation update only, nothing to test.

- [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/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/231

Differential Revision: D4211422

Pulled By: rnystrom

fbshipit-source-id: 9cb637e42300d9db173d99c1305845984d52ce7b
2016-11-20 08:29:04 -08:00
Ryan Nystrom
7a4ebc94bc Add stricter build flags
Summary:
Gets the `xcodeproj` in parity with our internal build settings.

Fixes #211

- [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/224

Differential Revision: D4210413

Pulled By: rnystrom

fbshipit-source-id: c820faf97ef04bc7cf7c369446d0e17829b6339b
2016-11-19 11:58:58 -08:00
Bofei Zhu
14e0727eff Specify end position for -scrollToObject
Summary: Closes https://github.com/Instagram/IGListKit/pull/196

Differential Revision: D4203333

Pulled By: rnystrom

fbshipit-source-id: 6ef0544c8e4f77afa25dd56df90c726d287c66a4
2016-11-18 10:58:58 -08:00
Ryan Nystrom
74affe0887 Fixes crash when accessing a cell within working range updates
Summary:
I was able to build a unit test that reproduces the issue. We can avoid the crash by simply returning `nil` when accessing a cell while working range events are being vended.

There is definitely something weird going on here though. When debugging `cellForItemAtIndexPath:` I found:

```
(lldb) po indexPath
<NSIndexPath: 0xc000000000000516> {length = 2, path = 5 - 0}
(lldb) po [[self collectionView] numberOfSections]
11
```

So in theory we should be fine, right? But when I continue I get

```
*** Assertion failure in -[UICollectionViewData numberOfItemsBeforeSection:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.5.2/UICollectionViewData.m:611
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'request for number of items before section 5 when there are only 3 sections in the collection view'
```

There _were_ 3 sections in the UICV before the update, but the data source and structure powering
Closes https://github.com/Instagram/IGListKit/pull/216

Differential Revision: D4204625

Pulled By: rnystrom

fbshipit-source-id: 455ed199dfc115077e4294e2843016a50e179015
2016-11-18 09:59:01 -08:00
Suraya Shivji
e2fbb68670 Swap NSUInteger to NSInteger Public API
Summary:
Swapped NSUInteger to NSInteger in public headers. Fixed a test in IGListSectionMapTests.m to pass with NSInteger. For issue #200!

- [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/205

Differential Revision: D4191521

Pulled By: rnystrom

fbshipit-source-id: 3f15c5ee3f8ed2d382de2602912a2e998bfbcbba
2016-11-16 15:28:59 -08:00
Ayush Saraswat
1f40dfcab7 Add -[IGListAdapter objectForSectionController:] helper method -- iss…
Summary:
Add -[IGListAdapter objectForSectionController:] helper method

Fixes #201

- [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/204

Differential Revision: D4189648

Pulled By: rnystrom

fbshipit-source-id: 75963dafef1a2905311e8edf6e98e99e5ab90061
2016-11-16 08:29:05 -08:00
Jesse Squires
204f7d5390 Docs updates and refinements, #181
Summary:
Did a full pass on documentation.

- Clean up
- Fixes
- Better markdown

> **NOTE:** this PR does not re-gen docs. I will do that next. Before we cut 2.0
Closes https://github.com/Instagram/IGListKit/pull/198

Reviewed By: rnystrom

Differential Revision: D4181253

Pulled By: jessesquires

fbshipit-source-id: 133c4af392bb396ecc6eff0c895c55e6d18730b7
2016-11-15 11:44:10 -08:00
Ryan Nystrom
8ea5e08880 Add edge-case unit tests
Summary:
- Removed dead code in batch data and updater
- Tested updating with empty index sets
- Tested updating with not-found section controller
- Tested reloading when collection view or data source are not set
- Tested `-[IGListAdapter sectionForObject:]`
- Tested index path return for not-found section controller
- Tested pointer comparison with `NSObject+IGListDiffable` category

Fixes #190, #189

- [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/191

Differential Revision: D4172781

Pulled By: rnystrom

fbshipit-source-id: c25cc917e9a1ebc5fc94fa022e01f99c80c2466c
2016-11-12 09:59:10 -08:00
Ryan Nystrom
ab890fc607 Change equality API to avoid NSObject override
Summary:
Changing the API to avoid overiding `-[NSObject isEqual:]` because of the side effects it brings (e.g. `-hash`). Not to mention the problems with Swift 2.3.

Fixes #65.

Reviewed By: jessesquires

Differential Revision: D4138570

fbshipit-source-id: 804af6c468c4c273adb73377e9bfda22515121d1
2016-11-10 16:59:02 -08:00
Bofei Zhu
6a53eaebce Change all @discussion to @note
Summary:
Fix #171
Closes https://github.com/Instagram/IGListKit/pull/182

Differential Revision: D4160454

Pulled By: rnystrom

fbshipit-source-id: aeedcf9646bcbfd31f8cab3937dcc5e9a486d5b6
2016-11-10 10:14:49 -08:00
Ryan Nystrom
1a92c15b50 Return nil if accesing OOB section
Summary: Rare crashers that take `NSNotFound` from `sectionFor...` API and then immediately look up the object w/out checking for not found. Instead return nil.

Reviewed By: dshahidehpour

Differential Revision: D4142946

fbshipit-source-id: ca80f87729b5ee6699740de897d73b819d27d132
2016-11-07 15:44:23 -08:00
Ryan Nystrom
386ae07864 Add visibleObjects API
Summary: Adding this API to make querying visible objects a little easier. Fixes #164.

Reviewed By: dshahidehpour

Differential Revision: D4138472

fbshipit-source-id: 0136c39e17c72941b85284b7f3b5494b1ddabf68
2016-11-07 07:29:06 -08:00
Ryan Nystrom
576ab4d1ff Remove NSIndexPath pretty print
Summary:
Saw this pop up in coverage reports. We don't log or assert `NSIndexPath` at all so this doesn't really seem necessary.

- [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/165

Differential Revision: D4138474

Pulled By: rnystrom

fbshipit-source-id: ad8375e47d1584f594d3df29f07a1d5d1a53f3c5
2016-11-06 12:44:10 -08:00
Ryan Nystrom
f5339113df Support supplementaryViews created from nibs (continued)
Summary:
Continuing the work on #90. I don't believe I can push directly to that PR since the origin is `master` of a repo I don't have access to.

https://help.github.com/articles/checking-out-pull-requests-locally/

I went ahead and added another supplementary view test copying the old one we had.

cc jessesquires in case there's something else I can do here. I believe this will still give rawlinxx credit?
Closes https://github.com/Instagram/IGListKit/pull/162

Differential Revision: D4137364

Pulled By: rnystrom

fbshipit-source-id: d8418ac5728fd6d9570fa1d1568f4343f5c4112b
2016-11-05 16:29:06 -07:00
Ryan Nystrom
cd6f8bce2a Remove reload data experiment
Summary: Another experiment with neutral results. Removing.

Reviewed By: jessesquires

Differential Revision: D4127194

fbshipit-source-id: cdafca161e0fec95cb35baad446929a03bb1cf4c
2016-11-03 16:29:32 -07:00
Ryan Nystrom
f682dfd45c Remove layout experiment
Summary: Experiment results were neutral. Removing.

Reviewed By: jessesquires

Differential Revision: D4127172

fbshipit-source-id: 1110ea1e0c08ad74f63840465f12be5b6b059c15
2016-11-03 16:29:31 -07:00
Bofei Zhu
158d04ebe0 Support supplementaryViews created from storyboard
Summary:
Miss this in the previous PR #92. Will add unit test soon.
Closes https://github.com/Instagram/IGListKit/pull/123

Differential Revision: D4101594

Pulled By: rnystrom

fbshipit-source-id: 820030358532b0878f6d9e9092834266c9260a38
2016-11-01 10:59:21 -07:00
Bofei Zhu
9685f2ba06 Provide object in IGListSingleSectionController size block
Summary:
Fix #144
Closes https://github.com/Instagram/IGListKit/pull/147

Differential Revision: D4111495

Pulled By: rnystrom

fbshipit-source-id: 34d66e60a7e389da684239b6a6aa992cbcd3d9cd
2016-11-01 10:59:21 -07:00
Ryan Nystrom
9e8ad9626a Remove iOS 7 UICollectionView delegate API support
Summary: Don't need support for iOS 7 anymore, save some cycles on layout.

Reviewed By: ocrickard

Differential Revision: D4098229

fbshipit-source-id: eeaaf875acda1229f9622f11acc7c77ccad75cf0
2016-10-29 14:59:09 -07:00
Jake Lin
eca0205c26 Call copy method to avoid a potential issue for an NSString property
Summary:
According to rnystrom 's comment on #125 , we leave only two small changes in this PR.
1. Call copy method to avoid a potential issue for an `NSString` property.
2. fix a typo.

close #125

- [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/131

Differential Revision: D4095492

Pulled By: rnystrom

fbshipit-source-id: b162842a38850c826685efd0746022daabe9d2b8
2016-10-28 07:59:06 -07:00
Vinh Nguyen
a3d5c14a87 Add missing docs in IGListAdapterUpdaterDelegate
Summary:
- Add missing docs in `IGListAdapterUpdaterDelegate`, fix #128.

- [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/130

Differential Revision: D4095494

Pulled By: rnystrom

fbshipit-source-id: 49acb065b61e3837a9624a4d7e9b50fcd08351e8
2016-10-28 07:44:16 -07:00
Roman Klauke
348b11da4f reword some assertions with more informations
Summary:
This commit changes some assertion texts. No behavior is changed; no assertions are added (just reworded).  Some of them were short or contained no real meaningful informations, where the error probably is.

Ref: #113

- [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/122

Differential Revision: D4090470

Pulled By: rnystrom

fbshipit-source-id: 96f492a1efd258ec3424ce334802229fdbdee191
2016-10-27 14:29:12 -07:00
Ryan Nystrom
b5aa5e3900 Replace diff result API for batch updates
Summary:
Replacing the move+update API with a batch-updates-safe API on the diff results object. This makes using the diff results w/out the rest of IGListKit infra much easier when working with `UITableView` or `UICollectionView`.

- Added unit tests
- Removed outdated unit tests

Reviewed By: dshahidehpour

Differential Revision: D4065798

fbshipit-source-id: 30da8a7b483d56d5acc497da9320dc07a6d0b7ad
2016-10-26 11:59:13 -07:00
Bofei Zhu
8855b5156a Add storyboard support #39
Summary:
This PR is for #39

- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/92

Differential Revision: D4066721

Pulled By: rnystrom

fbshipit-source-id: 4fca278ae9a54aa46626932d47d4a4c001b437d6
2016-10-25 15:29:13 -07:00
Bofei Zhu
a01e9954e3 Add asserts to IGListAdapter
Summary:
Fix #91
Closes https://github.com/Instagram/IGListKit/pull/108

Differential Revision: D4063183

Pulled By: rnystrom

fbshipit-source-id: 8ff4a5ac3bf7418cb968093e9f87b7fc55bc2fe1
2016-10-21 19:59:14 -07:00
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