• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Tracking visibleRect changes using Autolayout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Tracking visibleRect changes using Autolayout
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: iOS 6.0 SDK UIApplicationInvalidInterfaceOrientation
  • Next by Date: IOS iPad PopOver Nav bar color
  • Previous by thread: Re: Tracking object references
  • Next by thread: Re: Tracking visibleRect changes using Autolayout
  • Index(es):
    • Date
    • Thread