uiimagepickercontroller

Save image to camera roll with UIImageWriteToSavedPhotosAlbum

心已入冬 提交于 2019-11-30 07:52:51
I am trying to save a photo with a button to camera roll after user capture a picture with Camera , but I don't know why my picture doesn't save at photo library !! Here is my code : -(IBAction)savePhoto{ UIImageWriteToSavedPhotosAlbum(img.image,nil, nil, nil); } -(IBAction)takePic { ipc = [[UIImagePickerController alloc]init]; ipc.delegate = self; ipc.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:ipc animated:YES]; } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { img.image = [[info

Setting delegate for UIImagePicker returns error

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 07:51:48
Having a problem in some swift code I had written for an OCR translation app. The code snippet is below: @IBAction func btnOCR(sender: AnyObject) { var languageAlert = UIAlertController(title: "For Your Information...", message: "The OCR feature currently only supports English & French.", preferredStyle: .Alert) languageAlert.addAction(UIAlertAction(title: "Okay", style: .Default, handler: { action in var image = UIImagePickerController() image.sourceType = UIImagePickerControllerSourceType.Camera image.allowsEditing = false image.delegate = self presentViewController(image, animated: true,

Photo taken with camera does not contain any ALAsset metadata

穿精又带淫゛_ 提交于 2019-11-30 07:20:56
The weirdest thing is happening. I have an action sheet which gives the user the choice to either take a photo with the camera or choose one from the camera roll. Upon the UIImagePicker returning from selection I use the ALAssetsLibrary to determine the GPS information embedded in the photo. Choosing a photo from the camera roll works perfectly and I am able to retrieve the GPS information. However, taking a photo with the camera provides absolutely no GPS information, in fact I have no metadata at all. Does anyone know what I'm doing wrong here? Code below: - (void)imagePickerController:

CGAffineTransformInvert: singular matrix in UIImagePickerController with showsCameraControls = NO

删除回忆录丶 提交于 2019-11-30 05:59:41
问题 I tried this twice with two different apps and I get the same thing. I have a set up a UIImagePIckerController instance as follows: - (IBAction)addImage:(UIBarButtonItem *)sender { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { NSArray *mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera]; if ([mediaTypes containsObject:(NSString *)kUTTypeImage]) { UIImagePickerController *picker = [

How to make UIImagePickerController StatusBar lightContent style?

僤鯓⒐⒋嵵緔 提交于 2019-11-30 05:13:23
When I present the ImagePickerController the statusBar text color is still black, how to make like this? folse Just three steps: 1: Add UINavigationControllerDelegate , UIImagePickerControllerDelegate to your @interface yourController ()<> 2: imagePickerController.delegate = self; 3: -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; } Alex Wally Swift solution by writing an extension for

How can you enable the iOS 6.0 panorama camera within an application?

[亡魂溺海] 提交于 2019-11-30 05:09:16
I'm working on an app for iOS 6 that utilizes the camera, but I've been unable to figure out how to enable the options which would allow the user to take a panoramic shot. I've got everything working as far as taking a normal photo goes, but would like to give the user the option to use the new panorama feature in iOS 6 in the app. I've scoured the net and not been able to find any information (SO, Apple Dev Center, etc). I'm unable to determine whether this is even a possibility or not. Can we use this, and if so, how? This is not possible. Access to the camera is only possible via

UIImagePickerControllerReferenceURL always returns nill

不打扰是莪最后的温柔 提交于 2019-11-30 04:44:20
问题 I am trying to get the name of the image which I have just captured from camera with following code. But [info objectForKey:@"UIImagePickerControllerReferenceURL"] always returning nil. How can I get the URL? - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { self.myinfo = info; NSLog(@"Dismissing camera ui..."); [self.cameraUI dismissViewControllerAnimated:YES completion:nil]; NSLog(@"Getting media url..."); NSString *mediaURL

How to pick multiple images from UIImagePickerController in ios

纵饮孤独 提交于 2019-11-30 04:04:20
I am trying to simply enable picking multiple images from photolibrary using the UIImagePickerController .I'm relatively new to XCode and I don't understand how to allow the user to pick multiple images from the UIImagePickerControler . This is my current code.Please help any body how to pick multiple images from UIImagePickerController . -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { switch(buttonIndex) { case 0: [self takeNewPhotoFromCamera]; break; case 1: [self choosePhotoFromExistingImages]; default: break; } } - (void)takeNewPhotoFromCamera

UIImagePickerController's cameraViewTransform is ignoring 'scaling' and 'translation' on iOS 10 beta

旧时模样 提交于 2019-11-30 02:33:32
问题 I have been using below code to scale my UIImagePickerController's live preview to fill the entire screen. This worked perfectly till now. Before few days, I installed iOS 10 beta 7 on an iPhone 5 and it doesn't scale anymore. I can see black patch at the bottom of UIImagePickerController's view. Seems like cameraViewTransform is ignoring the CGAffineTransformMakeScale and CGAffineTransformMakeTranslation calls. This is how I initiate my camera controller. I have set both "allowsEditing" and

Camera differences between UIImagePickerController and AVCaptureSession on iPhone

守給你的承諾、 提交于 2019-11-30 02:28:30
I'm trying to build a replacement for UIImagePickerController , using AVCaptureSession with AVCaptureDeviceInput and AVCaptureStillImageOutput , as input/output respectively. To preview the camera stream I'm using AVCaptureVideoPreviewLayer . It's now working correctly for capturing and storing photos just like the default camera. However, I found 3 problems I was unable to solve: photos captured don't get the same quality the default camera provides the viewing/capture angle is shortened, just like using the video capture on the default camera no way to control camera specific options like