Hello,

I have a very wide view which is placed inside an NSScrollView using
Autolayouts. The view's horizontal intrinsic width is the width of the
view, and the intrinsic height is NSViewNoIntrinsicMetric because I want it
to be whatever height the parent gives it. To do this, I've set the
constraints on the NSClipView parent to "V:|[my_view]|" This is all working
fine so far.

The background of the view is a relatively complicated drawing operation,
and I'd like to cache the visibleRect portion of the drawing, so that I can
just blit it to the screen and then draw over the top. My problem is I
can't work out how to track when visibleRect changes. Before switching to
Autolayout I was overriding -[NSView resizeWithOldSuperviewSize:], and then
creating a new cache with the visibleRect size in that, but the presence of
resizeWithOldSuperviewSize: appears to stop Autolayout from working.

Does anyone have any hints of something I may have missed, or something I'm
going about the wrong way?

Thanks,
iain
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to