How to save NSWindow position for multiple screen?
<p>I am setting autosavename for window in IB. In windowcontroller of window  I am doing following - </p>

<pre><code>  override func windowDidLoad() {
        super.windowDidLoad()

        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
        self.window?.setFrameUsingName("TestWindowContollerAutoSaveName")
    }
</code></pre>

<p>This is as simple as possibly can be. It works perfectly if I use it on single screen. But If I am using multiple screens then initial window position is always on main screen. It doesn't remember the screen where app was quit.
I have also tried (with no luck) -</p>

<pre><code>  override func windowDidLoad() {
        super.windowDidLoad()

        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
        let frameString = self.window?.stringWithSavedFrame
        if let _ = frameString{
            self.window?.setFrameFromString(frameString!)
        }
    }
</code></pre>

<p>How to correctly use <strong>setFrameUsingName</strong> method? Thanks for your help.</p>