iOS Camera Preview Method on entry - Overlay Issue - ios

how can I know when the camera preview is showed after the picture is taken? I want this because I'm using an overlay and when the app goes to the camera preview, the bottom bar gets smaller and so my overlay doesn't cover all the screen, all that I want is to resize this overlay when the camera preview is shown.

I solved using a translation for down on "camerapicker.transform" property, so now taken picture would be at the same position as while taking the photo, so the overlay would also would be in the same position.

Related

Remove white screen that comes before opening custom camera in swift 4

I am trying to add custom camera functionality in my app following this tutorial.Appcoda custom camera
I am able to achieve all the functionailties of camera like taking photo,flash and switch camera but before the camera comes,white screen comes for a second.I want the camera to open directly .Kindly give some suggestion that how can I get the camera functionality directly without getting any white screen.
That white screen in actually Launch Screen, which comes by default, if you wish to change that you may go to LaunchScreen.storyboard and change UI there.
You can also remove LaunchScreen property in info.plist file, which is not advisable but that'll just display black screen instead of while while launching the App.

iOS live camera overlay AVCaptureSession

So this is a general question but was looking for a lead on how to have the live camera view with the ability to add images on top and take a pic. So basically you can select like a "Hat" image that overlays on the camera, adjust its size and position, then take a pic and the "Hat" will be on the image you took. I saw a few directions like AVCaptureSession but was not sure if anyone has done something like this to point me in the right direction.
Here is answer how to add a video layer:
Get Camera Preview to AVCaptureVideoPreviewLayer
You could add a subview on the top of your video view and then take a screenshot:
Why does my programmatically created screenshot look so bad on iOS 7?

Live zoomed view in an inset kind of box , when clicking pictures on camera view in iOS

I wan't to achieve the following thing:
--> When user tries to click picture through app ,i want to add another small rectangular view in which zoomed view is visible live while capturing image(which is seen by camera). Is it possible? I mean i have found that live streaming of camera is possible but that is in case of video.
I want to see zoomed view live when user moves camera.
Thanks in advance!

Photo Flash Animation like Photo Booth Mac Application in iPad

I need to show the Photo Flash Animation present in the Photo Booth Mac application in iOS.
How to do that one?
The "flash" in Photo Booth for Mac is just a white surface, isn't it. To replicate it, I would:
Create a transparent window that covers the entire screen (or multiple windows if there are multiple screens).
Place a CALayer inside the window. Then animate the change of the layer's background color from transparent to white and back.
Remove the window from the screen.

How to force UIImagePickerController's editing to square or proportional?

I'm using UIImagePickerController to allow the user to select a photo of himself to use as a player avatar image. When I show a UIImagePickerController inside of a UIPopoverController on the iPad, and when I setAllowsEditing:YES, I get a square editing area inside of the picker if the device is held in portrait mode. But if I rotate the device to landscape, the cropping area becomes rectangular. Is this the expected behavior of UIImagePickerController? Or am I doing something wrong? Is there a way to force the editing behavior to be 1:1 ratio or proportional? The docs seem to indicate that there is no control and that it should always be square: "When using built-in editing controls, the image picker controller enforces certain options. For still images, the picker enforces a square cropping as well as a maximum pixel dimension."

Resources