Custom button instead of the default button on the camera iphone 4 - iphone

I know you must do to take a picture with a button that was created by me and not the default one.
Also as you can remove the preview that comes after taking a photo?
Can you help?

Use the showCameraControls property of UIImagePickerController to show or hide the default controls
Use the cameraOverlayView property of UIImagePickerController to provide your own view to display atop of the camera view. You can then assign this property a custom UIView that will contain your own UIButtons
Use the takePicture action/method of UIImagePickerController to ask the camera picker to take a picture. You will typically call this method in the action of your custom button.
Read the documentation and the Programming Guides ;)

Related

iPhone camera toolbar buttons

The iPhone camera toolbar holds the following buttons: cancel/record
I would like to change the cancel button to the small image button that takes me to the photo library.
I wasn't sure if i need to use the overlay or does the xcode have something more comfortable in this case since this is something well known and used.
Is there something like this?
Thanks,
You can set overlayView to your UIImagePickerController
imagePicker.cameraOverlayView = yourOverlayView;
UIImagePickerController Class Reference
You can customize an image picker controller to manage user interactions yourself. To do this, provide an overlay view containing the controls you want to display, and use the methods described in “Capturing Still Images or Movies.” You can display your custom overlay view in addition to, or instead of, the default controls. Custom overlay views for the UIImagePickerController class are available in iOS 3.1 and later by way of the cameraOverlayView property. For a code example, see the PhotoPicker sample code project.

UIActionSheet... How to implement UIImagePicker?

I'm new to iOS developement... I want to add 3 buttons on this view: cancel, choose from library and take from camera.
I already know the UIImagePicker method.
Thanks
Ciao Davide, reading UIImagePickerController Class Reference should be useful:
You can customize an image picker controller to manage user interactions yourself. To do this, provide an overlay view containing
the controls you want to display, and use the methods described in
“Capturing Still Images or Movies.” You can display your custom
overlay view in addition to, or instead of, the default controls.
Custom overlay views for the UIImagePickerController class are
available in iOS 3.1 and later by way of the cameraOverlayView
property. For a code example, see the PhotoPicker sample code
project.
Here there is UIImagePickerController Class Reference:
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html
And here there is PhotoPicker sample code:
http://developer.apple.com/library/ios/#samplecode/PhotoPicker/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010196

HIde shutter animation UIImagePickerController

I want to hide animation that shows shutter opening while presenting UIImagePickerController to take picture. I checked this question for the same which contains the accepted but I was unable to replicate that functionality in my controller.
I gave overlayView as self.view and when I hide PLCameraView it shows blank white portion and than I am able to take picture. Is there any way to remove that white portion ?
IF needed I can post my full sourcecode project...
Can some body please highlight how to do this ?
Edit:
What I want to do is based on certain event and conditions I want to place image taken from camera or default image in db. And picture taking doesn't involve user interaction so I put NSTimer and take snapshot with the help of takePicture method.
Any thoughts ?
Instead of messing about with the view hierarchy of UIImagePickerController (which you are forcefully warned against in the docs) you should probably use AVCaptureSession and create your own ImagePicker to capture raw images from the video feed.
See http://developer.apple.com/library/ios/#samplecode/AVCam/Listings/Classes_AVCamCaptureManager_m.html for hints.

How to change the UIImagePickerControllerSourceType in iPhone

Hey can anybody tell me how I can change the camera view in iphone where i found to buttons like 'use' and 'retake' and 'Move to Scale'message in that window I want to add some Label on top most part.How could I do that.
Reply soon
You question title and your actual question seem a bit different.
To change the UIImagePickerControllerSourceType just set your controller's .sourceType property to your desired type:
UIImagePickerControllerSourceTypePhotoLibrary,
UIImagePickerControllerSourceTypeCamera,
UIImagePickerControllerSourceTypeSavedPhotosAlbum
Now, to add a label on the picker controller, you should create your UILabel and add it to your picker's "camera overlay view" (#property(nonatomic,retain) UIView *cameraOverlayView). To use this feature you should be building your app for OS 3.1 or later.
In any case, it would help to take a look at the UIImagePickerController Class reference.

How do I programmatically make clicking on a UIImageView do something on the iPhone?

I have programmatically added a UIImageView. How do I make it send a message to my controller when the users clicks it, sending itself as the only parameter?
I wouldn't use a UIImageView unless there was some other compelling reason. I'd just use a custom UIButton and use the UIImage as its background.
Create a new class that extends UIImageView and use that.
In your class, override the touch events - touchesBegan, touchesEnded and/or touchesMoved as appropriate
From those methods, call back to a method on the controller.
I'd just put a custom button over the UIImage view, and use normally - buttons with Custom style are invisible and so will not obscure the image. It's also a great way to turn regions of text into clickable areas as well.
Or, you could assign the custom image as a graphic background for the button.
just put a button over the imageview, with the Alpha attribute set to 0.10 or less.
you can capture the button's tap event but almost cannot see it.