Question

I have a NSScrollView, which I would like to resize automatically. I would send a method to it's documentView to get the size of it, like in a table view I would calculate and return the required size of the rows.

My problem is, when? How can I figure out if the documentView of the scroll view has been resized?

Has anyone an idea how to do this? Which methods do I have to override?

I'll publish the project on Github if I figure it out.

Was it helpful?

Solution

Any NSView or a subclass will call -viewWillStartLiveResize and -viewDidEndLiveResize when resizing begins and ends.
NSView Class Reference

Or, if you're interested in knowing when the window is resized:
Stack Overflow: get window height/width in real-time

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top