Commit graph

30 commits

Author SHA1 Message Date
Valeriy Van
90d2805115 Changes 'if let _ = object as?' for 'if object is'
Summary:
Changes 'if let _ = object as?' for 'if object is'

- [x] All tests pass. Demo project builds and runs.
- [ ] 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/83

Differential Revision: D4034281

Pulled By: jessesquires

fbshipit-source-id: f63e853b080ee63595ae5a808f4a2177c4615798
2016-10-18 02:44:21 -07:00
Valeriy Van
96a9555ecb Makes objects function more swifty.
Summary:
Makes objects function more swifty.

- [x ] All tests pass. Demo project builds and runs.
- [ ] 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/74

Reviewed By: dshahidehpour

Differential Revision: D4030906

Pulled By: jessesquires

fbshipit-source-id: 9a986fd4b470da0a33fadfd71f41f86b324df5be
2016-10-17 14:59:07 -07:00
Valeriy Van
799517d6ae Using switch with is cases instead of if with multiple as?.
Summary:
Using switch with is cases instead of if with multiple as?.

- [x] All tests pass. Demo project builds and runs.
- [ ] 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/82

Reviewed By: dshahidehpour

Differential Revision: D4030890

Pulled By: jessesquires

fbshipit-source-id: fc17795620509572ed1d9fa6ef405357acab9a9b
2016-10-17 14:44:28 -07:00
Ryan Nystrom
8a96fc9c64 Extension only API flag
Summary:
Adds `APPLICATION_EXTENSION_API_ONLY = YES` to Xcode project.
Closes https://github.com/Instagram/IGListKit/pull/79

Differential Revision: D4028543

Pulled By: rnystrom

fbshipit-source-id: 203afacb5485dd4dc5897991d7981cf80f6da993
2016-10-16 19:44:06 -07:00
Ryan Nystrom
d4f64c3e90 Swap test nib to test bundle
Summary:
IGTestNibCell.xib was in the wrong bundle after imported internally (moved it to `Assets` dir)

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

Reviewed By: ryanolsonk

Differential Revision: D4028444

Pulled By: rnystrom

fbshipit-source-id: cb7ed0f8024ca9fd116827f3935f075c1d9193be
2016-10-16 16:44:02 -07:00
Valeriy Van
1e73bc69b0 Fixes compilation errors in example app.
Summary:
Fixes compilation errors in example app.

- [x] All tests pass. Demo project builds and runs.
- [ ] 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/71

Differential Revision: D4027054

Pulled By: rnystrom

fbshipit-source-id: 50020d309e8cf69dabaa1958d9f1eed37dc6ee63
2016-10-15 12:29:15 -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
221c2fbd20 Makes objects function more swifty.
Summary:
- [x ] All tests pass. Demo project builds and runs.
- [ ] 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/70

Reviewed By: nlutsenko

Differential Revision: D4025610

Pulled By: rnystrom

fbshipit-source-id: 927e93cec5719466dc152f82a235d5a70e53109d
2016-10-14 17:44:19 -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
Chris Amanse
ab21a7f669 Fix typo in connecting data source code in README
Summary:
Only README.md was changed. Fixed the typo in example code for connecting data source (replace opening parenthesis with whitespace).

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

Reviewed By: jessesquires

Differential Revision: D4012595

Pulled By: rnystrom

fbshipit-source-id: f27774e20c7a2ec3154cacbf919fd295625bace4
2016-10-14 11:14:15 -07:00
Ben Asher
fd22609e7e Use bundler to manage CocoaPods and xcpretty
Summary:
- Travis appears to be using CocoaPods 1.1.0.beta.2, which is missing some fixes for Xcode 8 (see [sample failing build](https://travis-ci.org/Instagram/IGListKit/jobs/166935850) from #51).
- This change will ensure that a consistent CocoaPods version is used by Travis
- In the added Gemfile, I picked the latest CocoaPods 1.1.0 RC (matches version in Podfile.lock) and the latest xcpretty.
- Changed `pod spec lint` to `pod lib lint` to verify local files instead of files from the version specified in the spec.

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

Differential Revision: D4019655

Pulled By: rnystrom

fbshipit-source-id: 422e55c44dfdf276b587ea6e12ae30218a237ff5
2016-10-13 19:29:09 -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
4863974f9d Added CHANGELOG entry for #51
Summary:
Fixed #63. I used the style we use in CocoaPods, but I'm happy to adjust!

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

Reviewed By: jessesquires

Differential Revision: D4015999

Pulled By: rnystrom

fbshipit-source-id: bbe8055f22e84c5bdc628b4c1d95dab111774e12
2016-10-13 11:14:18 -07:00
ReadmeCritic
8b32b80aac Correct the spelling of CocoaPods in README
Summary:
This pull request corrects the spelling of **CocoaPods** 🤓
https://github.com/CocoaPods/shared_resources/tree/master/media

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">One day I’ll make a bot that looks through the READMEs of all Pods, looks to see if it uses “Cocoapods” and PRs “CocoaPods” :D</p>&mdash; Ørta (orta) <a href="https://twitter.com/orta/status/697374357975388160">February 10, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

Created with [`cocoapods-readme`](https://github.com/dkhamsing/cocoapods-readme).
Closes https://github.com/Instagram/IGListKit/pull/59

Reviewed By: ocrickard

Differential Revision: D4009138

Pulled By: jessesquires

fbshipit-source-id: fedaa51e883a78e52de4f7d934e0945b946cc751
2016-10-12 11:14:17 -07:00
Bas Broek
58e5888dea Jessie > Jesse
Summary:
Corrected Jesse's name.

- [x] All tests pass. Demo project builds and runs.
- [ ] 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/60

Reviewed By: ocrickard

Differential Revision: D4009130

Pulled By: jessesquires

fbshipit-source-id: 5786282f0690829374096bed1528138dccf0a703
2016-10-12 11:14:16 -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
Patrick Balestra
bd72c71cd6 Fix Twitter handles in Example project
Summary:
I was exploring the example project when I noticed that two Twitter handles were wrong.
This will probably be the most useless PR ever in `IGListKit`, but it's good that you guys get the correct acknowledgment for your hard work! 🤓

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

Reviewed By: ryanolsonk

Differential Revision: D4008615

Pulled By: rnystrom

fbshipit-source-id: 904892d40fed73045e724cc87dddf641af02e27d
2016-10-12 09:14:10 -07:00
James Kuang
a7124a0fe5 Update README 'pk' to 'primaryKey' for consistency
Summary:
Updated README example for naming consistency

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

Reviewed By: ryanolsonk, ocrickard

Differential Revision: D4008590

Pulled By: rnystrom

fbshipit-source-id: 74412ca77054cd6a15c0783b95f5d7a87eaf4c96
2016-10-12 07:59:14 -07:00
Ryan Nystrom
6e3656449f Update User copy in readme to a real-world example
Summary:
Copy changes. Can proof them here: https://github.com/Instagram/IGListKit/tree/readme

I got some feedback that the `User` example didn't make sense (*why would you have two users with the same pk?*).

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

Reviewed By: jessesquires

Differential Revision: D4006618

Pulled By: rnystrom

fbshipit-source-id: 9673788b643785d223b67ab1b23315edfc5874cb
2016-10-11 19:44:04 -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
Martin Arista
7a48b429cd Add carthage instal steps
Summary:
Added Carthage Install Steps #13

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

Differential Revision: D4005535

Pulled By: jessesquires

fbshipit-source-id: 5414c1e967abfbbe7a5d199b1e3b09b844e52c63
2016-10-11 17:44:09 -07:00
Ryan Nystrom
d8a48943c3 Pod file updates
Summary: Pod files were skipped after API renames.

Reviewed By: jessesquires

Differential Revision: D4003106

fbshipit-source-id: d3b5336a8e98880549d4414d679cbeff94169a01
2016-10-11 16:25:32 -04:00
Marcelo Fabri
78b37f49a5 CocoaPods spelling in README
Summary:
Just a nitpick.
Closes https://github.com/Instagram/IGListKit/pull/44

Reviewed By: jessesquires

Differential Revision: D4002826

Pulled By: rnystrom

fbshipit-source-id: c2472435505d2e16ffd8285811793b6c2bb904d9
2016-10-11 13:14:09 -07:00
Ryan Nystrom
1483e8e99b Fix intern syncing with xcodeproj 2016-10-11 15:24:47 -04:00
Adam Sharp
f833986df2 Use type checking instead of casting in README
Summary:
Just a little improvement to a code example.

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

Reviewed By: jessesquires

Differential Revision: D4002830

Pulled By: rnystrom

fbshipit-source-id: b6fb8f87752f0886333c4445107caac8219027e9
2016-10-11 12:14:10 -07:00
Ryan Nystrom
e15311a0a2 Add carthage badge to readmme
Summary: Title

Reviewed By: jessesquires

Differential Revision: D4002935

fbshipit-source-id: d407942c49407807776e1d911177c040c25f4355
2016-10-11 11:59:07 -07:00
Ryan Nystrom
1bcd5f0019 Fix logo with absolute URL
Summary: Title

Reviewed By: jessesquires

Differential Revision: D4002448

fbshipit-source-id: 5f117da26d4dcfe7d6b45b3378f0471575f363b8
2016-10-11 11:44:20 -07:00
Jesse Squires
b11303467b Fixes for .travis.yml
Summary:
- iPhone 7 doesn't run iOS 9.3
- We have workspaces, not projects
- Remove some redundancy
Closes https://github.com/Instagram/IGListKit/pull/43

Reviewed By: jessesquires

Differential Revision: D4002408

Pulled By: rnystrom

fbshipit-source-id: a30d51293ac85f8704349b0bf8fc8acf0e8e5dee
2016-10-11 11:14:11 -07:00
Ryan Nystrom
e2d11d95f6 Update podspec version tag
Summary: Title

Reviewed By: jeremycohen

Differential Revision: D4002326

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