Custom NSView embedded in NSSscrollView
问题 Is there a way for a custom NSView to know whether it is embedded in a NSScrollView or not? I am creating a custom NSView for displaying some content. When my view is placed in a window or another view, its size is fixed and the content is clipped to available size. When my view is placed in a NSScrollView its size must be adjusted according to content so it can be scrolled if necessary. I know I can add a member in my view that specifies the NSScrollView that hosts my view and set this