Q-Mobile / QGrid

🎛 QGrid: The missing SwiftUI collection view.
MIT License
1.64k stars 104 forks source link

Use lastRowAtIndex for the last row #3

Closed giiiita closed 5 years ago

giiiita commented 5 years ago

// Dirty little hack to handle layouting of the last row gracefully : I tried to improve this.

giiiita commented 5 years ago

Thank you for the review! Combined into one function!

karolkulesza commented 5 years ago

Thanks for the changes! Merging, I’ll just remove the contentCount param and one condition in rowAtIndex func, as they’re unnecessary. Thank you👍

giiiita commented 5 years ago

ForEach((0..<(isLastRow ? data.count % cols : cols))

Thank you for a good clean!!!