• 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
Re: replacing NSViewAnimation with CoreAnimation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: replacing NSViewAnimation with CoreAnimation


  • Subject: Re: replacing NSViewAnimation with CoreAnimation
  • From: email@hidden (Stefan Haller)
  • Date: Fri, 23 Nov 2007 17:05:08 +0100
  • Organization: Ableton

Stefan Haller <email@hidden> wrote:

> It's in <http://developer.apple.com/releasenotes/Cocoa/AppKit.html>:
>
> : Basic default animation parameters are provided for the following
> : NSView and NSWindow properties, such that they will animate
> : automatically when assigned a new target value via the view or
> : window's animator:
> :
> : for NSView: alphaValue, frame, frameOrigin, frameSize, frameRotation,
> : frameCenterRotation, bounds, boundsOrigin, boundsSize,
> : backgroundFilters, contentFilters, compositingFilter, shadow
>
> This sounds to me as if it should be possible to animate the
> boundsOrigin of an NSClipView.  However, it says this under the heading
> "Using Layer-Backed Views"; does that mean that I have to make the
> NSClipView layer-backed for this to work?  Do I want to?  I certainly
> don't want to make the scroll view's document view layer-backed, as it
> can become pretty large.

I tried it, and yes, setWantsLayer:YES on the scroll view makes it work.
However, it only works for reasonably small document views; for larger
views, I get either

  -[_NSViewBackingLayer(0x172c0cf0) p={0, 0} b=(0,0,817,1.00355e+06)
   superlayer=0x15f9b400 display]: Ignoring bogus layer size
   (817.000000, 1003552.000000)

or

  CoreAnimation: 817 by 6848 image is too large for GPU, ignoring
  CoreAnimation: rendering error 500


So it seems that the CATiledLayers feature which the release notes talk
about doesn't seem to work.  Or is there something I have to do to
enable it?

For now I'm back to animating it manually using NSAnimation, which works
just fine; although it does look a little less smooth (and results in a
lot more CPU load, of course).


--
Stefan Haller
Ableton
http://www.ableton.com/
_______________________________________________

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

References: 
 >Re: replacing NSViewAnimation with CoreAnimation (From: email@hidden (Stefan Haller))

  • Prev by Date: Re: With What does Apple Swizzle the IsA-pointer in KVO?
  • Next by Date: Large progress indicators in Leopard
  • Previous by thread: Re: replacing NSViewAnimation with CoreAnimation
  • Next by thread: HUD button
  • Index(es):
    • Date
    • Thread