IOS take photo with image picker

Posted on Dec 08, 2013 4:08 AM, Ios - Stack Overflow |

I have seen many questions here about taking photo with this api

but I run into specific problem

with following code

.h file

   @interface ComposeMViewController : UIViewController <UITextFieldDelegate , UITableViewDelegate ,UITableViewDataSource, UIImagePickerControllerDelegate , UINavigationControllerDelegate , MFMailComposeViewControllerDelegate , MFMessageComposeViewControllerDelegate , DistributionListViewControllerDelegate,UITextViewDelegate>

in .m

    UIImagePickerController * CameraPicker = [[UIImagePickerController alloc] init];
    CameraPicker.delegate = self;

    [CameraPicker setSourceType:UIImagePickerControllerSourceTypeCamera];
    [self presentViewController:CameraPicker animated:YES completion: nil];

I getting an exception that unrecognised selector sent in to instance 0X something and it refers to the CameraPicker source type

I have also tried to do :

CameraPicker.SourceType = UIImagePickerControllerSourceTypeCamera; 

but here I getting compiler error that it isn't allowed with ARC

could some 1 please point me ? Thanks :)

Tagged photos

ask your own question if you didn't find an answer
Xcode 4.5 Tutorial - Image Picker (Part 1)Xcode 4.5 Tutorial - Image Picker (Part 1)
Xcode Tutorial 11 - UIImagePickerControllerXcode Tutorial 11 - UIImagePickerController
iPad Form Maker - Create your own native iOS formsiPad Form Maker - Create your own native iOS forms
iPad Form Maker - Image FieldsiPad Form Maker - Image Fields
Related Messages

IOS take photo with image picker Memory Leak

I have seen many questions here about taking photo with this api but I run into specific problem with following code .h file @interface ComposeMViewController : UIViewController <UITextFieldDelegate ,...

How to take photo with front and rear camera simultaneously?

I'm trying to make an app that takes a picture using the front and the rear camera in one picture. This is kinda how it would look. I've read and searched...

Take Photo with Camera - SurfaceTexture error on HTC one x

I get this error whenuse the camera and google map at the same FragmentActivity. If i comment the camera code no gets errors, but wheni activate this code, google the map...

IOS: Take photo or select from library

I want to get an image from the user as shown here. This looks like a lot of work: see if device has camera create action sheet with appropriate options translate "Take Photo" and...

IOS: UITableView lagging with image data

I have a UITableview that has a list of images like so. But it is very laggy for some reason when I scroll up and down. Any way to stop...

Uploading image picker photo ios

I have the image picker which retrieves an image from the inbuilt camera: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [info objectForKey:UIImagePickerControllerEditedImage]; UIImage *chosenImage = info[UIImagePickerControllerOriginalImage]; ...

Reboot when i take a photo with Stock 4.4

When I take a picture with the flash, you hear a strange noise of the autofocus, and a few seconds afterthe phone restart. all this with the stock 4.4. I...

Uploading image iOS to PHP with MKNetworkEngine - I know it works, but cannot get PHP to capture

I created an iOS application which uploads an image taken by the camera to a server using the MKNetworkEngine, as outlined in the following tutorial: If I set the host...

Send mail with image attachment from camera in ios xcode

There are a LOT of tutorials and info about how to send attachment with your iphone / ipad app, but with pre-defined images or other file-type. But how do i send...

HTML iPhone "Take photo or video" reduce image size

If I have a simple HTML file input: <input type="file"> and it's clicked and I choose "Take photo or video" then the image that will be uploaded is HUGE, round 5MB, this...