uiimagepickercontroller

Terminated App due to memory Pressure

谁说胖子不能爱 提交于 2019-12-06 06:13:14
问题 I have an app to take images in Burst mode ,but once when the image is take and about to come the preview its getting crashed and error shows that "Terminated App due to memory Pressure " I need to take more number of images when user holds the camera button...after Leave the button ,i need to show all the images as slideshow..what i have to do ? My code is: - (void)longPress:(UILongPressGestureRecognizer*)gesture { if (gesture.state == UIGestureRecognizerStateBegan) { [[NSNotificationCenter

iOS 8 UIImage Metadata

蓝咒 提交于 2019-12-06 06:09:20
This is my first question I've a a "little" problem: when i read UIImage metadata on iOS 7 I use this code and it works great #pragma mark - Image Picker Controller delegate methods - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage* image = [info objectForKey:UIImagePickerControllerOriginalImage]; [self metaDataFromAssetLibrary:info]; [picker dismissViewControllerAnimated:YES completion:NULL]; } From imagePickerController i choose the image and call metaDataFromAssetLibrary method - (void) metaDataFromAssetLibrary:

Memory warning when using UIImagePickerController

隐身守侯 提交于 2019-12-06 06:03:23
问题 Im getting a memory warning when Im using the camera on an iPhone. Im also using ARC. When you take a photo and press the 'use Photo' button on the camera view controller I get a memory warning. The intention is once the 'use Photo' button is pressed that it changes the contents of the an ImageView. I thought the memory issue might be due to the fact that the image that is captured is full screen, and the ImageView is 250h 250w. But I tried scaling down the size of the image taken by the

ios 9.3 UIImagePickerController memory issue

旧时模样 提交于 2019-12-06 05:58:01
Screenshot UIImagePickerController was working very well on iOS 9.2, with a memory usage of 19m in my iPhone. Since iOS 9.3, I noticed that the memory usage is increasing to 300m and the application crashes. my code: import UIKit import MobileCoreServices class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } func pick(){ let imagePicker = UIImagePickerController() imagePicker.delegate = self imagePicker.sourceType =

UIImagePickerController camera not working swift

狂风中的少年 提交于 2019-12-06 04:38:16
I have an action sheet that has two options: one where you can choose an image from your library and one where you can take a photo from the camera. The photo library functions properly, but I can't seem to get the camera to work. Here is my code: let takePhoto = UIAlertAction(title: "Take photo", style: .Default, handler: { (alert: UIAlertAction!) -> Void in // present camera taker var cameraPicker = UIImagePickerController() cameraPicker.delegate = self cameraPicker.sourceType = .Camera self.presentViewController(cameraPicker, animated: true, completion: nil) }) func imagePickerController

UIImagePickerController (using camera as source) does autorotate on iPad2, how do i stop it?

女生的网名这么多〃 提交于 2019-12-06 04:10:40
问题 I am trying to write an app with some camera function, and I use an overlay view to decorate it with an image. This is how I implement the app: I use the UIImagePickerController to who the user what the camera takes in, and add a UIImageView onto the cameraOverlayView as a subview so that it works like this: (image at http://www.manna-soft.com/test/uploads/UIImagePickerView-portrait.jpg) This works fine until the iPad2 come into place... it autorotates like this and ruin the layout: (image at

How to add UIImagePickerController in UiView

喜你入骨 提交于 2019-12-06 03:54:31
How to add UIImagePickerController in UiView in TabBarApplication It doesn't matter if you are in a tab, this code goes into the ViewController class for your view Create a picker when you want one UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; // configure it how you want Add the picker [self presentViewController:picker animated:YES completion:nil]; Your view controller needs to be declared like @interface YourViewController : UIViewController<UIImagePickerControllerDelegate, UINavigationControllerDelegate> And you need to implement - (void

lock UIImagePickerController in Portrait mode in ios app

馋奶兔 提交于 2019-12-06 03:23:31
问题 In my IOS app, when I open the camera I have placed an image over the camera view. It looks good in portrait mode. But when it is changed to landscape mode it looks some odd. So I want to lock the UIImagePickerController in Portrait mode. Following is my code for ui image picker controller UIImagePickerController *imgPkr = [[UIImagePickerController alloc] init]; imgPkr.delegate = self; imgPkr.sourceType = UIImagePickerControllerSourceTypeCamera; How it can be locked in portrait mode.... 回答1:

UIImagePickerController that allowsEditing incorrectly crops the image leaving a black bar across the top

岁酱吖の 提交于 2019-12-06 02:16:13
问题 I'm using UIImagePickerController in a popover on the iPad to take a picture with the front camera. I set allowsEditing to YES and get the awesome built in "Move and Scale" view after taking the picture. The crop rectangle in this view measures 320x267 on the screen despite the fact that the image is cropped to a 320x320 square (http://dl.dropbox.com/u/2246698/moveAndScale.png). If i accept the image as is without resizing or moving it, there is a ~25px high black bar across the top as if the

Loading UIImage from UIImagePickerControllerReferenceURL

梦想的初衷 提交于 2019-12-06 02:04:17
问题 I am using a UIImagePickerController to allow users to select an image from the image library. I then want to start the location of that file in a sqlite database so I can refer to it later. I've been doing some googling about how to do this and I'm coming up rather short. I know I can get the ReferenceURL of the item by calling inside the delegate method: NSURL *picURL = [info objectForKey:@"UIImagePickerControllerReferenceURL"] This does give me a valid NSURL object and if I output picURL