• 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: animating a non-interpolated view property and totally confused
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: animating a non-interpolated view property and totally confused


  • Subject: Re: animating a non-interpolated view property and totally confused
  • From: Nathan Vander Wilt <email@hidden>
  • Date: Thu, 14 Feb 2008 11:08:50 -0600 (CST)

--- David Duncan <email@hidden> escribió:
> What you need to do is implement a "squareness"
> property on your view
> that basically says how far you are between Square
> and Circle. When
> you are asked to animate, you return a
> CABasicAnimation - you don't
> need to modify it at all, just let setTypeOfObject
> do the work for you
> to either say Square or Circle as the extreme of
> your "squareness"
> property.

Thanks much! With that direction I was able to figure
it pretty much out. I added a +defaultAnimationForKey:
method to my custom view,  and made my enumeration
setter store the old value [there are actually more
than two possible enumerated states, and I should come
clean and say the property isn't really a C
enumeration, but my own "state" class] and then call
the "betweenness" setter through the animation proxy.
This gets me the stream of redraw requests I was
hoping for.

Now that I've got the basics working, I do have two
follow-up questions:

1) I want to set my view instance as a delegate of the
CABasicAnimation. It seems the only practical way to
to this is to override the -animationForKey: method,
but the NSAnimatablePropertyContainer protocol
documentation for that says "Subclasses should not
typically need to override this method." So long as I
pass any keys I don't handle to super, is this okay to
do?

2) I'd really like the controller, not the view, to
determine whether or not a property is animated.
However, when I refactor the [[self animator]
setBetweenness:1.0] call in the view's
setTypeOfObject: to instead be a [[myView animator]
setTypeOfObject:kTriangle] call in the controller, the
animation system doesn't animate the view's internal
[self setBetweenness:1.0] property change.
How can I arrange things so that the controller can
decide whether/not to use the proxy animator, but
still access the property via the primary
("typeOfObject") key?

thanks,
-natevw


      ____________________________________________________________________________________
¡Capacidad ilimitada de almacenamiento en tu correo!
No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:
http://correo.espanol.yahoo.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: animating a non-interpolated view property and totally confused (From: David Duncan <email@hidden>)

  • Prev by Date: Re: In-loop releasing of objects does not free memory?
  • Next by Date: Re: fetching the window pointer of other applications (processes)
  • Previous by thread: Re: animating a non-interpolated view property and totally confused
  • Next by thread: Changing Framework's Location
  • Index(es):
    • Date
    • Thread