Commit graph

4 commits

Author SHA1 Message Date
Valeriy Van
adbb21fd9d Uses Set instead of Array for uniqueness.
Summary:
Uses Set instead of Array for uniqueness.

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

Differential Revision: D4057235

Pulled By: rnystrom

fbshipit-source-id: e284d2244d32e83ff0df56473dfa3d8b602ef95b
2016-10-21 00:14:20 -07:00
Valeriy Van
64784974ed Minor fixes in WorkingRangeViewController.swift
Summary:
Using more suitable type cast.
Using guard statement.

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

Differential Revision: D4056145

Pulled By: rnystrom

fbshipit-source-id: 537fccc781747f835155bfe8ccac45a1e8cdb037
2016-10-20 19:29:19 -07:00
Ryan Nystrom
cad3a55aa6 Working range example copyright
Summary:
Fixes #99

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

Differential Revision: D4056133

Pulled By: rnystrom

fbshipit-source-id: 2df58028c444c1a352946efc4191154eb459676f
2016-10-20 19:29:19 -07:00
Ryan Nystrom
f6e088acd8 Working Range example
Summary:
Adding a working range example to the example app. This example:

- Displays a list of images downloaded from unsplash.it
- Create 20 uniquely-random sized objects
- When section controllers enter the range, create a data task to download the image
  - When finished, store image in `downloadedImage`
  - Set in cell if cell is visible
  - Don't create task if already downloaded or task created
- Cancel task when section controller is destroyed
- Show a spinner cell while downloading the image

Fixes #84

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

Differential Revision: D4050210

Pulled By: rnystrom

fbshipit-source-id: 628a777fa819dccd9d9f4f58646cdf72fb4bc65c
2016-10-19 23:29:12 -07:00