RxDataSources
RxDataSources copied to clipboard
Override SectionedViewType behavior in UITableView subclasses
Currently it's not possible to override SectionedViewType default method implementations in subclasses of UITableView. I'd like to prevent the default animations and just re-render the cell just like Apple suggests in reload rows Discussion https://developer.apple.com/documentation/uikit/uitableview/1614935-reloadrows.
Unfortunately when I try to override reloadItemsAtIndexPaths the compiler complains with Overriding non-@objc declarations from extensions is not supported.
That's because the default methods are added like this https://github.com/RxSwiftCommunity/RxDataSources/blob/76973cd78e853cdcf4e6781f8dde002a6518198d/Sources/RxDataSources/UI%2BSectionedViewType.swift#L22
Is this the intended behavior? If yes - what's the reasoning?
I can think of 2 possible solutions if this is not the desired behavior:
- Mark
SectionedViewTypewith@objc - Implement the default methods like this:
extension SectionViewType where Self: UITableView