IGListKit
IGListKit copied to clipboard
Swift Refinements
Closing this as I've been experimenting w/ an all-swift rewrite that is a much better direction. Hoping we can open source this soon!
Originally posted by @rnystrom in https://github.com/Instagram/IGListKit/pull/1081#issuecomment-502477079
Given the fact that @rnystrom is no longer working at Instagram, I'm guessing the all-swift rewrite he was experimenting with is not going to be finished any time soon, right?
Would you accept a PR that adds Swift refinements to some of the APIs?
For example; the dequeueReusableCellOfClass:forSectionController:atIndex: could be refined in Swift to return a correctly typed cell;
func dequeueReusableCell<T: UICollectionViewCell>(
of cellClass: T.Type, withReuseIdentifier reuseIdentifier: String,
for sectionController: ListSectionController, at index: Int) -> T {
return self.__dequeueReusableCell(
of: cellClass, withReuseIdentifier: reuseIdentifier,
for: sectionController, at: index) as! T
}
Happy to take a look at PRs that add Swift refinements!