• 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
Performance of a crossfade
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Performance of a crossfade


  • Subject: Performance of a crossfade
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Fri, 30 Sep 2011 08:45:37 -0400

I am currently performing image crossfades using the following method:

*
- (void)crossFadeMainImage:(UIImage *)image1 toImage:(UIImage *)image2 {
    CABasicAnimation *crossFade = [CABasicAnimation animationWithKeyPath:@
"contents"];
    crossFade.duration = 0.5;
    crossFade.delegate = self;
    crossFade.fromValue = (id)image1.CGImage;
    crossFade.toValue = (id)image2.CGImage;
    [self.mainImage.layer addAnimation:crossFade forKey:@"animateContents"];
    self.mainImage.image = image2;
}
*

It works wonderfully, however the performance to begin the fade takes a
little while (under a second but it's not instant). The UIImageView is
nearly full screen on an iPad & the images are larger than that because the
UIImageView is within a UIScrollView that allows zooming and panning (want
to keep the image quality up when zoomed in).

Is there something that could be done to make this happen a little quicker?

I am using ARC.

Thanks,
Eric
_______________________________________________

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

  • Prev by Date: Re: Core Data : Undo Delete : Cannot fulfill a fault
  • Next by Date: Re: Finder Integration
  • Previous by thread: Re: Finder Integration
  • Next by thread: -(BOOL)acceptsFirstResponder and -(BOOL)becomeFirstResponder 's return values are ignored
  • Index(es):
    • Date
    • Thread