I want to open camera with animation effect, so that it should appear that camera is opening in the parent screen only.
I am using camera overlay screen and on click event of button in parent screen,camera overlay screen is opening,in camera overlay screen there is a cancel button to close the camera,so while closing the camera again I need to show the animation effect that it should appear that now camera is closed in the same parent scree.
I have tried kCATransitionMoveIn but not fully satisfied,if any once has better solution please help me.
CATransition * contentAnimation = [CATransition animation];
contentAnimation.type = kCATransitionMoveIn;
contentAnimation.subtype = kCATransitionFromBottom;
contentAnimation.duration = 1.0;
contentAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];
[[self.view layer] addAnimation:contentAnimation forKey:kCATransition];
//self.view.hidden = YES;
[CATransaction commit];
// Show the scanner overlay
[self presentModalViewController:overlayController.parentPicker animated:TRUE];
I have resolved the issue and I have taken the ZBar SDK example as a reference and this link1 and link2 also helped me.