Instagram / IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
https://instagram.github.io/IGListKit/
MIT License
12.89k stars 1.54k forks source link

WatchOS support for Diffing #1052

Open jlaws opened 6 years ago

jlaws commented 6 years ago

It would be great to have the Diffing subspec for WatchOS, is there a reason why it's restricted to iOS/TVOS/MacOS currently?

rnystrom commented 6 years ago

Great question! The diffing part should easily be usable in watchOS. Is our CocoaPods setup now restricting that? If so, Iā€™d instantly accept a PR to change that.

Sent with GitHawk

Sherlouk commented 6 years ago

IIRC the issue was when I looked at this previously that the diffing code has pretty strong references to an IndexSet which is currently not in watchOS

This may be wrong though so definitely worth a check!

ajkolean commented 6 years ago

Just checked. Indeed, it looks like the issue lies with the property `section' of NSIndexPath being defined in UITableView.h of UIKit.

jlaws commented 6 years ago

Sounds like NSIndexPath/IndexPath need to be abstracted behind a protocol so that WatchOS can have its own implementation. Would a change like that work for a PR?

rnystrom commented 6 years ago

NSIndexPath is available in watchOS, just not the UIKit extensions (section, row, item). We should be able to easily use the basic version of NSIndexPath (using actual index paths to represent section/item).

Sent with GitHawk

futuretap commented 1 year ago

I wrote this, maybe it's helpful: https://github.com/futuretap/IGListKit/commit/f785f5bde572a65756a8c2ebe138e721d02b6ba5

TimOliver commented 1 year ago

@futuretap Oooh! Fantastic! Absolutely! Could you please add that as a PR? šŸŽ‰šŸ™

futuretap commented 1 year ago

I'm hesitant since I no longer use IGListKit, so the code isn't tested against HEAD. But feel free to grab it.