I am working on camera application in which I want to set the screen of the camera i.e camera window appear for particular frame. And in front of camera screen the cut out image is coming so that user can see the background through the cut out part of the image and capture the image. So any one know to do this i.e. customization of UIImagePickerController.
UIImagePickerController has a property named cameraOverlayView. Use this to set your camera overlay as any view you like. Use normal view transparency for letting the user see parts of the live camera view.
Related
Is there a way presenting the camera interface not in full screen specially in the iPad?
I've tried the cameraOverlay but it still present the camera UI in full screen.
just add an additional view object to your nib/storyboard and use that as your camera interface.
I want to change my view size using user touch input.
What I know and will be trying is using TouchesMoved method and then finding the nearest vertex of the view to the touch, make the view increase in that direction using animation.
But there are few problems I have before I start.
1) The camera app has same functionality in cropping photo. There is a grid displaying actual crop area. I don't know how to display that grid. I don't have any knowledge of opengl. I would like to have that as a indication of user is in edit mode?
2) The camera app crop functionality is also of changing the size using user touch input but it only changes view size, if the touch is near the four vertices of the view. From what I know there is a method to check if the touch is in a specific rect CGRectContainsPoint but how do I filter it to bounds of the view?
Edit
I tried yinkou answer, downloaded from Git.
Now the real question is in the git Xcode project. There is a view which has image as a contentView and if user drag that view, the image also changes shape based on view resizing.
I am doing this in a camera app. I attached AVCaptureVideoPreviewLayer as a contentView. Now my view is resizing but the AVCaptureVideoPreviewLayer stays the same size. Am I doing something wrong or is it that AVCaptureVideoPreviewLayer won't increase?
And happily, there's a control out there:
https://github.com/spoletto/SPUserResizableView
I am trying to make an app which will take snap from camera.the view of the camera would be within a particular area say it would be in a user specified area.is it possible to show the camera controls in another view which will be attached with the camera view as the camera view would be pretty small to show all the camera controls.
I am using the UIImagePickerController with an overlay view so I can have some custom controls. I notice that when the user clicks the "Capture" button and I call [imagePicker takePicture], the shutter animation doesn't occur. The effect is that I see the view sort of freeze and then continue in camera mode for a second before the image is captured and I display it over the camera view.
Make sense?
So, in other words, when the UIImagePickerController is initially presented, you see the shutter animation open up to reveal the camera, but when using overlay views and hiding camera controls, when I take the picture I don't see it. Would really like to. :-(
Any ideas?
There is currently now way to do this with the built in UIImagePicker animation. You would have to use AVFoundation and roll your own capture animation whenever you take the picture
How do I use UIImagePickerController to show a overlay (say a small circle)?
Also when the user clicks the picture, only the part of the photo inside the circle is returned, how do I go about that?