• 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: NSImageView animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImageView animation


  • Subject: Re: NSImageView animation
  • From: Troy Stephens <email@hidden>
  • Date: Mon, 27 Oct 2003 14:08:36 -0800

On Oct 27, 2003, at 10:52 AM, Daryl Thachuk wrote:
> I see that NSImageView has gotten animation support in Panther but the
> docs on how it works are rather sparse. Has anyone figured out how the
> magic works?

Why, just like magic, of course. :^)

Checking the "Animates" box for an NSImageView in Interface Builder, or
sending [imageView setAnimates:YES], enables the view to automatically
play back any animated image that's assigned to it. (Currently,
animated GIFs are supported.)

If what you're asking is how this is implemented, have a look at
NSBitmapImageRep.h. The API is all public. Using the
-setProperty:withValue: and -valueForProperty: methods with the
following keys, you can access the individual frames of an animation
and their properties.

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
APPKIT_EXTERN NSString* NSImageFrameCount; // GIF input (int in
NSNumber) (read-only)
APPKIT_EXTERN NSString* NSImageCurrentFrame; // GIF input (int in
NSNumber)
APPKIT_EXTERN NSString* NSImageCurrentFrameDuration; // GIF input
(float in NSNumber) (read-only)
#endif
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
APPKIT_EXTERN NSString* NSImageLoopCount; // GIF input (int in
NSNumber) (read-only)
#endif

Troy Stephens
Cocoa frameworks, Apple
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSImageView animation (From: Daryl Thachuk <email@hidden>)

  • Prev by Date: Re: Use Xcode environment for Cocoa tutorials?
  • Next by Date: Re: Source-based installer
  • Previous by thread: NSImageView animation
  • Next by thread: (OT?) Where does one find a Cocoa programmer?
  • Index(es):
    • Date
    • Thread