• 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
CALayer and View Scaling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CALayer and View Scaling


  • Subject: CALayer and View Scaling
  • From: Gordon Apple <email@hidden>
  • Date: Sun, 29 Jun 2008 22:25:28 -0500

    Apparently, there is a disconnect between the view's coordinate system
context and that of the contained CALayers.  I'm using Sketch's
SKTZoomingScrollView to set the scale factor of my main drawing view.  It
works great without CALayers.  What is does is it scales the bounds of the
containing NSClipView, which automatically scales my main view.  However,
the CALayers don't scale when they draw in the view.

    BTW, I tried unsuccessfully to observe the clip view's bounds to trigger
code to resize the CALayers.  Why can't I observe it?  I finally set an
observer on the scale factor in SKTZoomingScrollView.

    What is the best way to make the CALayers track my main view?  The main
view is not really changed except for the fact that it is embedded in the
clip view which has rescaled its bounds.  Apparently, scaling the view
coordinates does not propagate down to the CALayers.

_______________________________________________

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: CALayer and View Scaling
      • From: Scott Anguish <email@hidden>
    • Re: CALayer and View Scaling
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: Thread safe reference counting
  • Next by Date: Re: Is this still true?
  • Previous by thread: Re: Scrolling during zoom
  • Next by thread: Re: CALayer and View Scaling
  • Index(es):
    • Date
    • Thread