Contents

window(withWindowNumber:)

Returns the window corresponding to the specified window number.

Declaration

func window(withWindowNumber windowNum: Int) -> NSWindow?

Parameters

  • windowNum:

    The unique window number associated with the desired Nswindow object.

Return Value

The desired window object or nil if the window could not be found.

Discussion

window(withWindowNumber:) may return nil for window numbers found using windowNumbers(options:) if there is no corresponding window object owned by your app—for example, the menu bar.

See Also

Managing App Windows