Bordertown Labs Blog

Notes from Bordertown Labs with posts regarding software development for the iPhone, Ruby on Rails, tips and code.

» Contact with inquiries.


Visualize your geodata in augmented reality with 3DAR by Spot Metrix.


Posts tagged "animation"

Mar 2nd, 2011 @ 1:43 pm

Apple camera iris animation

The iPhone Development Wiki has a very nice listing of private animations which are available but not necessarily acceptable by Apple. Here’s how to show the coveted iris animation.

CATransition *animation = [CATransition animation];
animation.delegate = self;
animation.duration = 0.33;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.type = @"cameraIrisHollowOpen";  // Or cameraIrisHollowClose, cameraIris

[someContainerView.layer addAnimation:animation forKey:nil];

I recommend setting the duration to INT_MAX and taking a screenshot of the closed iris and then throwing that into a UIImageView to display before the animation begins, then hide the image right after starting the animation.




Comments (View)

 


 

Archive · RSS · Theme by Autumn