How to programatically call a Segue on an NSMenu object?

I have a view controller that is attached to my main menu via Segue and I am trying to figure out how to programatically call that segue? I can't use the performSegue() as when I try to use it on an NSMenu object, I get an error saying NSMenu has no method performSegue. I tried just calling self?.performSegue(withIdentifier:"mySegueName", sender: nil) from another viewController where I want to call the segue but the segue doesn't exist in that viewController so I'm assuming that's why it does nothing. Does anyone have any suggestion as to how I can call this?

Replies

Why do you segue and not instantiate the destination controller and call present ?

  • I did end up doing it that way. I just wanted to try and be consistent in the way I'm launching it.

Add a Comment