Tracking visibleRect changes using Autolayout
Tracking visibleRect changes using Autolayout
- Subject: Tracking visibleRect changes using Autolayout
- From: iain <email@hidden>
- Date: Mon, 18 Feb 2013 12:12:15 +1100
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 (email@hidden)
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:
This email sent to email@hidden