Xcode Error trying to subclass UIContextMenuConfiguration

I'm getting Xcode compiler error when trying to subclass UIContextMenuConfiguration.
Here's simple code that reproduces the problem:

Code Block
@available(iOS 13.0, *)
class DateDifferenceContextMenu: UIContextMenuConfiguration {
init(indexPath: IndexPath, dateDifference: Int) {
super.init(identifier: nil, previewProvider: nil, actionProvider: nil)
}
}

The error reads:

Must call a designated initializer of the superclass 'UIContextMenuConfiguration'.

My super call matches the designated initializer. What's wrong?


That would seem to be a convenience initializer

You should probably look at this stackoverflow question
https://stackoverflow.com/questions/63869139/xcode-error-trying-to-subclass-uicontextmenuconfiguration
Xcode Error trying to subclass UIContextMenuConfiguration
 
 
Q