I have a base class that implements an extension that conforms to the protocol as shown below:
protocol OptionsDelegate { func handleSortAndFilter(opt: Options) } extension BaseViewController: OptionsDelegate { func handleSortAndFilter(opt: Options) { print("Base class implementation") } }
I have a subclass of "InspirationsViewController" that inherits from BaseViewController. And I redefine the protocol method in the extension, as shown below:
extension InspirationsViewController { override func handleSortAndFilter(opt: Options) { print("Inside inspirations") } }
I get an error when I redefine the function "handleSortAndFilter" in a subclass extension: "Decryption in extensions cannot yet override"
But I do not see a similar problem when I implemented the UITableView and delegation data methods.
How to avoid this error?
source share