Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS:How to open camera with animation effect?

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];
like image 370
User97693321 Avatar asked Oct 02 '11 06:10

User97693321


People also ask

How do I use the new iOS 11 camera effects?

To use these new iOS 11 camera effects, you’ll have to make sure Live Photos is on. Open the Camera app, and at the top center you should see a ringed circle. If it’s yellow, it’s on; if it’s white with a diagonal line across it, then it’s off.

What is animation in iOS and why is it important?

Animation is a critical part of your iOS user interfaces, giving apps the ability to draw user attention to particular areas. Using the right animation will not only improve user experience, but can also add a ton of fun and polish to your app.

How do I view all the effects on my iPhone camera?

Tap on the shutter icon to take a photo. Then find the photo by tapping on Camera Roll on the bottom left corner of the camera app. Swipe the photograph up, and you’ll see all four effects in a carousel gallery — swipe left to see all of them.

How do I use the camera on my iOS 12 device?

If you're still confused and dying to use the new Apple iOS 12 features, I'll walk you through it! Once you hit the camera icon on your compose text message page, the camera will open up. Once you're on this screen, you'll want to tap the star-like icon on the bottom left side of the screen — that's where are the tricks and treats are hiding.


2 Answers

This could be somewhat tidious but try out downloading ZBar SDK which is .dmg file. and double click it. You will find Examples Folder. In that you will find 4 apps. Try out that app in Device only. You will find amazing CAMERA open with animation effect.

like image 118
DShah Avatar answered Sep 30 '22 04:09

DShah


I have resolved the issue and I have taken the ZBar SDK example as a reference and this link1 and link2 also helped me.

like image 34
User97693321 Avatar answered Sep 30 '22 02:09

User97693321