0

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.

IluTov
  • 6,807
  • 6
  • 41
  • 103

1 Answers1

2

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

Community
  • 1
  • 1
John Sauer
  • 4,411
  • 1
  • 25
  • 33