• 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: best way to add transitions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: best way to add transitions


  • Subject: Re: best way to add transitions
  • From: M Pulis <email@hidden>
  • Date: Mon, 1 Dec 2008 20:13:54 -0700

Thanks, Matt,

The pointers are appreciated.

Gary


On Dec 1, 2008, at 7:57 PM, Matt Long wrote:

Gary,

I haven't used IKImageView, however, it does implement the NSAnimatablePropertyContainer protocol:

http://developer.apple.com/documentation/Cocoa/Reference/ NSAnimatablePropertyContainer_protocol/Introduction/ Introduction.html#//apple_ref/occ/intf/NSAnimatablePropertyContainer

This means that you can set its transition animation for a key you specify. Most notably, the key you want is 'subviews' (I believe). Try something like this:

[imageView setAnimations: [NSDictionary dictionaryWithObjectsAndKeys:transition, @"subviews", nil]];

Where 'transition' is a CATransition animation. Something like this:

CATransition *transition=[CATransition animation];
[transition setType:kCATransitionFade];
[transition setSubtype:kCATransitionFromTop];
[transition setDuration:1.0f];

If you don't need to do it in code, you can also select a transition using Interface Builder. Just click on your IKImageView view in IB and select the "Effects" tab in the inspector. At the bottom you'll see a segment called "Transitions". Select "Custom" and in the Subview drop down, then select "Fade" for the Type.

HTH,

-Matt


On Dec 1, 2008, at 7:54 AM, M Pulis wrote:

Hello Cocoa folk,

My app uses an IKImageView in its main window. Until the user engages some function, the IK view sequentially displays slides prompting the user to become involved, a typical attract mode.

What is now requested is a transition such as fade (or any of the variety of transitions) instead. From reading about views, layers and transitions (oh my!), I am seeing more trees than forest....

What is the best approach to add transitions to an IKImageView? An outline should do, I ought to be able to figure out the calls by now.

Thanks!

Gary

_______________________________________________

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: 
 >best way to add transitions (From: M Pulis <email@hidden>)
 >Re: best way to add transitions (From: Matt Long <email@hidden>)

  • Prev by Date: Re: Custom NSSlider?
  • Next by Date: Textual representation of an NSData?
  • Previous by thread: Re: best way to add transitions
  • Next by thread: Re: best way to add transitions
  • Index(es):
    • Date
    • Thread