What is the correct syntax for UIMenu and UIAction in iOS 13, using Xcode 11.0 beta 3?
The following code was working in Xcode 11.0 beta 2
let action = UIAction(title: "title", image: image, options: []) { action in
// some action
}
let menu = UIMenu(__title: "", image: nil, identifier: nil, children: [action])
The UIAction seems to have changed to something like
let action = UIAction(__title: "title", image: image, identifier: nil, handler: { _ in
// some action
}
but this crashes with the error
+[UIAction actionWithTitle:image:identifier:handler:]: unrecognized selector sent to class 0x7fffa1b30178
[General] +[UIAction actionWithTitle:image:identifier:handler:]: unrecognized selector sent to class 0x7fffa1b30178