1 Reply
      Latest reply on Oct 15, 2019 1:15 PM by Claude31
      narcisfromgirona Level 1 Level 1 (0 points)

        (Swift and macOS)


        I have a window that I would like to be in all the spaces. One option would be that the window could change when the user goes to another space.


        I could find that in the documentation: https://developer.apple.com/documentation/appkit/nswindow/1419707-isonactivespace


        I am not sure how to implement it. This is what I tried. It does not work:


            override func viewDidLoad() {



                    self.view.window?.collectionBehavior = NSWindow.CollectionBehavior.canJoinAllSpaces

                    self.view.window?.collectionBehavior = NSWindow.CollectionBehavior.moveToActiveSpace



        Should I do anything else, anything different?


        Thank you