Unable to connect @IBSegueAction

I have single view controller with a

UIButton
containing the following code:
import UIKit class ViewController: UIViewController {      required init?(coder: NSCoder) {         super.init(coder: coder)     }      @IBSegueAction     func makeAnotherController(coder: NSCoder, sender: Any?, segueIdentifier: String?) -> ViewController? {         return ViewController(coder: coder)     } }

According to the release notes, this is the correct signature for a

@IBSegueAction
, and it compiles OK. The release notes say…

Create a connection from a segue to an @IBSegueAction method on its source view controller. On new OS versions that support Segue Actions, that method will be called … An IBSegueAction method takes up to three parameters: a coder, the sender, and the segue’s identifier. The first parameter is required, and the other parameters can be omitted from your method’s signature if desired

I'm unable to complete the first step (create a connection)by dragging from the storyboard scene to the assistant editor, although I can connect to other outlets or actions without issue


Any thoughts? Xcode 11 bug or am I doing something wrong?

Replies

The code above is wierdly formatted and I can't edit the issue 🙄. Trying again…


OK, turns out this "editor" is useless and can't format code properly. See here… https://stackoverflow.com/questions/56588858/unable-to-connect-ibsegueaction