Pick selected item from a Nsmenu on Swift

Asked

Viewed 38 times

1

I am using Ampathpopupbutton to save a text file, but the problem is that I cannot get the folder selected by the user. The code is like this:

import Cocoa;
class SaveFile: NSViewController {

    @IBOutlet weak var lista: NSMenu!

    override func viewDidLoad() {
        super.viewDidLoad();
    }

    override var representedObject: AnyObject? {
        didSet {

        }
    }

    @IBAction func save(sender: AnyObject) {

        //pegar valor aqui

    }
}
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.