• 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: Simple Flipbook Animation?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple Flipbook Animation?


  • Subject: Re: Simple Flipbook Animation?
  • From: Jeshua Lacock <email@hidden>
  • Date: Sat, 1 Nov 2008 11:26:06 -0600


On Oct 31, 2008, at 12:13 PM, John Harper wrote:

I described how to do this using a CAKeyframeAnimation in a previous thread:

http://www.cocoabuilder.com/archive/message/cocoa/2008/8/3/214715

I am trying to adapt this technique for the iPhone SDK, but attempting to add the images NSArray to the KeyFrame animation causes my program to crash.


I heard that last week an iPhone dev list was created at Apple, but I have not been able to find it. I hope this is similar enough to be on- topic here, as I am using the same classes for the most part.

I can't find any examples that specify an image or array of images for the 'setValues' property.

NSArray *redExplode;
NSMutableArray *images;
images = [NSMutableArray array];
CGImageRef im;
UIImage *thisImg;
int p;

//frames ommitted for brevity
redExplode = [[NSArray arrayWithObjects:
   [UIImage imageNamed:@"redExlode.00000.png"],
   [UIImage imageNamed:@"redExlode.00001.png"],
   nil] retain];

for(p = 0;p<[redExplode count];p++)
{
	thisImg = [redExplode objectAtIndex: p];
	im = thisImg.CGImage;
	[images addObject:(id)im];
	CGImageRelease (im);
}

[anim setKeyPath:@"contents"];
[anim setValues:images];
[anim setCalculationMode:@"discrete"];
[anim setRepeatCount:HUGE_VAL];

[[UIAnimator sharedAnimator] addAnimation:anim withDuration:1.5 start:YES];


A backtrace reveals:

#0 0x950886ec in objc_msgSend ()
#1 0x9539d57f in NSPopAutoreleasePool ()
#2 0x953d6974 in __NSFireDelayedPerform ()
#3 0x96c10b45 in CFRunLoopRunSpecific ()
#4 0x96c10cf8 in CFRunLoopRunInMode ()
#5 0x31699d38 in GSEventRunModal ()
#6 0x31699dfd in GSEventRun ()
#7 0x30a5dadb in -[UIApplication _run] ()
#8 0x30a68ce4 in UIApplicationMain ()
#9 0x00002d3c in main (argc=1, argv=0xbfffef68) at /Developer-3.1.0/ Examples/iPhone/MoveMe/main.m:53


The assembly that is crashing is:

0x950886ec  <+0028>  mov    0x0(ķi),%esi


If I comment out the line "[anim setValues:images];", the program does not crash.


Any ideas?


Thanks,

Jeshua Lacock
Founder/Programmer
3DTOPO Incorporated
<http://3DTOPO.com>
Phone: 877.240.1364

_______________________________________________

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: Simple Flipbook Animation?
      • From: Matt Long <email@hidden>
    • Re: Simple Flipbook Animation?
      • From: Scott Anguish <email@hidden>
    • Re: Simple Flipbook Animation?
      • From: Ashley Clark <email@hidden>
    • Re: Simple Flipbook Animation?
      • From: Tito Ciuro <email@hidden>
  • Prev by Date: Re: Porting from Windows to Mac
  • Next by Date: Re: Simple Flipbook Animation?
  • Previous by thread: Re: UIScrollViewDelegate methods and touches with customized UITextView
  • Next by thread: Re: Simple Flipbook Animation?
  • Index(es):
    • Date
    • Thread