Replace DelegateProxy with concrete forward implementation#58
Replace DelegateProxy with concrete forward implementation#58toshi0383 wants to merge 4 commits into
Conversation
|
|
||
| func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { | ||
| let messages = sections[indexPath.section] | ||
| let message = messages[indexPath.row] |
There was a problem hiding this comment.
Without this PR, you likely to get crash here because given indexPath is not "reversed", which does not match indexPath passed to cellForRow.
| .map { i -> [MessageModel] in | ||
| (0..<i) | ||
| .map { | ||
| MessageModel(imageName: "marty1", message: "\($0) hello", time: "00:00") |
There was a problem hiding this comment.
@marty-suzuki
You can change MessageModel contents after merge, but please keep
- displaying indexPath to screen
- and to have different number of rows for each section
so it better demonstrates how the things work under the hood.
marty-suzuki
left a comment
There was a problem hiding this comment.
Thank you for fixing issues.
Almost fixes are good. But to remove DelegateProxy is unconsidered implementing scrollviewWillbeginDragging and so on to outside of ReverseExtension. (scrollviewWillbeginDragging is one of example.)
On the other hand, to not remove DelegateProxy causes calling ReverseExtension's delegate implementations and outside delegate implementations.
We need to think about other solutions.
|
@toshi0383 |
|
Thank you! I’ll do when I have free time, but feel free to take over this one because it will probably be later this year. |
88da462 to
9cf32ec
Compare
to demonstrate indexPaths passed via re.delegate is correctly "reversed".
|
@marty-suzuki Bottom section (section index 0) should have 2 rows but has 10. Let me know if you have any clue.🙏 |

fixes: Issues like #23 , #36
I faced this non-reversed index issue with
willDisplaydelegate.