uiimagepickercontroller

How do I make an exact copy of a UIImage returned from a UIImagePickerController?

↘锁芯ラ 提交于 2020-01-20 02:44:08
问题 I have divergent needs for the image returned from the iPhone camera. My app scales the image down for upload and display and, recently, I added the ability to save the image to the Photos app. At first I was assigning the returned value to two separate variables, but it turned out that they were sharing the same object, so I was getting two scaled-down images instead of having one at full scale. After figuring out that you can't do UIImage *copyImage = [myImage copy]; , I made a copy using

Custom showsCameraControls for UIImagePickerControllerSourceTypeCamera

主宰稳场 提交于 2020-01-16 04:35:07
问题 I want to add two extra buttons to my UIImagePickerController. I saw that done in an app: camwow but I couldn't find the documentation to do that. I have a view overlay over the UIImagePickerControllerSourceTypeCamera but at the moment touches on the buttons from the view overlay propagate to the camera controller which focuses. 回答1: I have had the same problem. Read these articles http://blog.airsource.co.uk/index.php/2008/11/11/views-of-uiimagepickercontroller/ and http://www.codza.com

How to convert Objective-C TOCropViewController delegate method in Swift?

别说谁变了你拦得住时间么 提交于 2020-01-14 03:09:06
问题 Actually I want to convert TOCropViewController delegate method.I used bridge_header in swift project & call TOCropViewController class in bridge_header file.Then I put delegate method in viewcontroller.swift.As far I did this let cropViewController = TOCropViewController(image:image) cropViewController.delegate = self self.presentViewController(cropViewController, animated: true, completion: nil) self.imageView.image = image But the how can convert below objective c TOCropViewController

Unable to get File name of image captured with camera

耗尽温柔 提交于 2020-01-13 15:02:18
问题 I'm trying to build an app in which I'm able to capture image with camera and save to gallery. But I'm unable to get the file name of image. If I select image from camera roll, then I'm able to get file name of selected image.But when I capture image with camera in my app, It returns file name " null ". Here is my code to save and select image from gallery using UIImagePickerController - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary

iphone how to go to the image gallery after taking photo through Xcode

老子叫甜甜 提交于 2020-01-13 05:51:28
问题 Hi all I am implementing the following code to take a photo through my application [[[UIApplication sharedApplication] keyWindow] setRootViewController:picker]; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:picker animated:NO]; Can anyone tel me How I can go to the photo gallery after the user takes the photo and not return to the application. 回答1: i think you might want to try this How to open camera while I click the UIButton in iPhone? or i

iphone how to go to the image gallery after taking photo through Xcode

旧街凉风 提交于 2020-01-13 05:51:04
问题 Hi all I am implementing the following code to take a photo through my application [[[UIApplication sharedApplication] keyWindow] setRootViewController:picker]; picker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:picker animated:NO]; Can anyone tel me How I can go to the photo gallery after the user takes the photo and not return to the application. 回答1: i think you might want to try this How to open camera while I click the UIButton in iPhone? or i

UIImagePickerController's shutter

假装没事ソ 提交于 2020-01-13 03:55:47
问题 I have bug with UIImagePickerController which source type is camera. Sometimes after controller appeared, shutter is not opens up and I can't to see a camera video signal, but photo taken is correct. May be I doing something wrong? Code: if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]){ UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init]; cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera; cameraUI.allowsEditing =

How to retrieve PHAsset from UIImagePickerController

徘徊边缘 提交于 2020-01-12 04:45:30
问题 I'm trying to retrieve a PHAsset however PHAsset.fetchAssets(withALAssetURLs:options:) is deprecated from iOS 8 so how can I properly retrieve a PHAsset? 回答1: I had the same the issue, first check permissions and request access: let status = PHPhotoLibrary.authorizationStatus() if status == .notDetermined { PHPhotoLibrary.requestAuthorization({status in }) } Just hook that up to whatever triggers your UIImagePickerController. The delegate call should now include the PHAsset in the userInfo.

Memory warning after using the UIImagePicker once

天大地大妈咪最大 提交于 2020-01-12 03:10:11
问题 I've referred to this very good reference: https://stackoverflow.com/questions/1282830/uiimagepickercontroller-uiimage-memory-and-more but I'm having some very serious issues. After I take a photo, I receive a memory warning. This is for the first photo I take, not the second or third. I was wondering if it's because I've got a couple of small jpegs loaded from the application directory into scrolling views. The only solution I can think of is to unload everything in my mainview whilst the

didFinishPickingMediaWithInfo returns different URL in iOS 13

浪子不回头ぞ 提交于 2020-01-12 02:30:49
问题 - (void)videoPickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<UIImagePickerControllerInfoKey,id> *)info returns different URLs in iOS 13 and the other iOSs. Any idea why this might be happening? iOS 13: file:///private/var/mobile/Containers/Data/PluginKitPlugin/0849234B-837C-43ED-BEDD-DE4F79E7CE96/tmp/trim.B8AB021D-F4B6-4E50-A93C-8B7F7FB40A1C.MOV < iOS 13: file:///private/var/mobile/Containers/Data/Application/5AE52A95-6A2F-49A5-8210-D70E022E9A05