2

How can one subclass an NSScrollView's DocumentView in order to do some custom drawing? I need to do some work with NSShadow inside of the scroll view.

John Wells
  • 1,139
  • 1
  • 10
  • 27

1 Answers1

2

The document view is just a normal view (subclass of NSView,) so all you have to do is to create a view, either programmatically or in Interface Builder, and set the scroll view's documentView property to the new view.

You can set the property in a suitable awakeFromNib method, for instance.

Monolo
  • 18,205
  • 17
  • 69
  • 103