marty-suzuki / ReverseExtension

A UITableView extension that enables cell insertion from the bottom of a table view.
MIT License
1.68k stars 130 forks source link

fix reversedIndexPath if sections are used #21

Closed sattler closed 7 years ago

sattler commented 7 years ago

I found an error in the reversedIndexPath method if sections are used. I tested this fix for my own application and it works as expected but if you have a better idea I would be interested to hear about it. The problem is that the number of rows in section was always determined using the section from the given IndexPath and calling the UITableView method numberOfRows(inSection:). However, if I called the methods in my ViewController the reversedIndexPath should have been used.

22

marty-suzuki commented 7 years ago

Hi, sattler Thank you for your PR!

I think this fixing is a better way! I'll merge this.