how to get custom camera view in iphone? - iphone

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.

Related

Why does unity shows UI button shows on top of background in game view whereas they are far from each other in scene view?

In the below image, you can see that the scene view and game view are different. The scene view just has the UI button but the game view shows the background image. In the scene view, the background image is so tiny, and is in the lower left corner. The button and the background is far in the scene. Also, in the main camera, I see the background but no button. How and why does game view shows the button on top of the background? What is the logic behind this?
how and why does game view shows the button on top of the background?
This is the normal expected behavior.
You are using a Screenspace Overlay Canvas which is in pixel space coordinates while the rest of your app is in Unity units (usually 1 per meter).
=> So for example if your GameView is 600x800 pixels in order to place a button with dimensions 100x60 at the bottom right it will have a position coordinate somewhat like 550x30 which is of course way out of the dimensions of the rest of your app content -> The canvas just appears huge and UI elements far apart in the Scene View.
To see your "normal" content simply double click on an item in your Hierarchy View and it will zoom in on it.

don't present camera in full screen

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.

Changing View size using user touch input

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

Customization of UIImagePickerController

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.

how can we make touch enable to a camera view?

can we do like that a user touch on the camera view and on this touch we can identify touch locations on this view.
i use the uiimagepickercontroller and added it on a button to the current view, after adding how can i identify the touch on this camera view that pop up after touch on any button.
Thanks
Balraj verma
You can use the new 3.1 Camera API's to turn off the camera controls, and then get a view into which you can add you own subview which detects touches anywhere on the screen.