Performance of a crossfade
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