NSWindow.didEndLiveResizeNotification and selecting rows in a NSTableView

I work for macOsx, and I have an NSWindowController which contains a NSTableView

Wanting to know when the table is resized, I add an observer on the NSWIndowController:


NotificationCenter.default.addObserver(self, selector: #selector(windowDidResize(_:)), 
name: NSWindow.didEndLiveResizeNotification, object: self)


Something I didn't understand is why when I select a row with the mouse, the didEndLiveResizedNotification is fired?

Answered by PatriceRapaport in 350953022

I found why, as I was trying to make a code to show you


When I select a row of the table, make some buttons of the windows's toolbar visible, or unvisible. And this action change the size of the window


Thank's anyway

I have tested a similr pattern, no problem.


Could you show the complete code of the class ?

Accepted Answer

I found why, as I was trying to make a code to show you


When I select a row of the table, make some buttons of the windows's toolbar visible, or unvisible. And this action change the size of the window


Thank's anyway

NSWindow.didEndLiveResizeNotification and selecting rows in a NSTableView
 
 
Q