uiimagepickercontroller

How to obtain the original file name of the image picked by UIImagePickerController?

徘徊边缘 提交于 2020-01-11 10:37:07
问题 I've implemented the delegate method and can get access to the picked UIImage, like this: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage *pickedImage = [info valueForKey:UIImagePickerControllerOriginalImage]; I want to save it to a directory, but I need a file name. So rather than just picking a random file name it would make sense to pick the same file name as the image. Is there a way to retrieve it from that info

detect when UIPopoverController has finished presented UIImageViewcontroller

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-11 09:57:06
问题 I have the UIImagePickerController as a content View Controller for the UIPopoverController. I need to detect when the popover has just finished presented (has just showed up). UIPopoverController does not have any delegate for this. I can't seem to find a way to detect the UIImagePickerController as well. (This is for iPad) Any suggestions? // UIImagePickerController let's the user choose an image. UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker

Memory leak in UIImagePicker in iphone

蓝咒 提交于 2020-01-07 05:40:51
问题 In my app user can take as may picture from camera, so after three time taking the picture it crashed. I can't resize the image (its requirement). So is there any other way to avoid memory leak. Thanks 回答1: There is a know issue with the uiimagepickercontroller with memory leaks. Apple recommend that you only allocate and instantiate only one instance and store it somewhere for the life of the application (whilst running that is). Don't create a new one, use it and deallocate it each time you

Closing only the ImagePicker and passing image to ScrollViewController

瘦欲@ 提交于 2020-01-07 02:16:32
问题 I have an ImagePicker that is displayed after a ScrollViewController is presented (1). Question: Once the image is picked from the ImagePicker , how do I dismiss just the ImagePicker so that the ScrollViewController is displayed and then pass the image picked to the ScrollViewController ? (1) Presenting ScrollViewController and ImagePicker let storyboard = UIStoryboard(name: "Main", bundle: nil) let vc = storyboard.instantiateViewControllerWithIdentifier("ScrollViewControllerID") as!

Upload image using AFnetworking did not response anything

微笑、不失礼 提交于 2020-01-06 21:08:58
问题 Here's the problem : I want to upload image immediately after finish choosing image from imagepicker. So, I put my code to upload image using afnetworking in imagepicker delegate method. But it doesn't response anything. //set the imageview to current image after choosing profilePic.image = image; //dismiss the imagepicker [picker dismissModalViewControllerAnimated:YES]; //start upload image code NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: @"steventi1901", @"username",

iOS Swift : SlidingMenuView wrong Position after presenting imagePicker

佐手、 提交于 2020-01-06 19:15:29
问题 I am using PageMenu in my project within a TabBar Controller and a Navigation Controller. When I initialize the "Scrolling menu" I use this to display it under the statusBar and the navigation bar : pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRectMake(0, UIApplication.sharedApplication().statusBarFrame.size.height + self.navigationController!.navigationBar.frame.height, self.view.frame.width, self.view.frame.height), options: parameters) This solution is working

iOS Swift : SlidingMenuView wrong Position after presenting imagePicker

被刻印的时光 ゝ 提交于 2020-01-06 19:11:01
问题 I am using PageMenu in my project within a TabBar Controller and a Navigation Controller. When I initialize the "Scrolling menu" I use this to display it under the statusBar and the navigation bar : pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRectMake(0, UIApplication.sharedApplication().statusBarFrame.size.height + self.navigationController!.navigationBar.frame.height, self.view.frame.width, self.view.frame.height), options: parameters) This solution is working

UIImagePickerController Freezes when camera flips

冷暖自知 提交于 2020-01-06 18:08:44
问题 My UIImagePickerController freezes and the camera closes when the button to flip the camera from front to back is pressed. This is how I initialize the image picker controller object within the project (the rest of the code was ommitted) from the methods as it is irrelevant to the UIimagepickercontroller object. //In my .h file UIImagePickerController * imgPicker; //in my .m file -(void)viewDidLoad { imgPicker = [[UIImagePickerController alloc] init]; imgPicker.delegate = self; imgPicker

Load Camera or PhotoLibrary with UIImagePickerController? [duplicate]

时光怂恿深爱的人放手 提交于 2020-01-06 15:52:16
问题 This question already has answers here : iOS 10 - App crashes To access photo library or device camera via UIImagePickerController (2 answers) Closed 3 years ago . I have recently put in code to either take a picture, or select a picture, in Swift 3 on iOS 10. When calling either open camera or photo library, my app crashes with a "Thread 14: signal SIGABRT" with no other indication of what's happening. To me, and from what I've debugged, is this happens when trying to load the native camera

AVCaptureSession vs. UIImagePickerController speeds

拈花ヽ惹草 提交于 2020-01-06 15:09:59
问题 At the moment I am using a custom overlay on a UIImagePickerController , calling takePicture() to capture images. However, it takes a good few seconds to call the delegate method didFinishPickingMediaWithInfo . I've heard about using AVCaptureSession for my control over the camera. Would this allow me to get faster picture-taking speeds (similar to that of Snapchat)? Or are there any other ways that I can Thanks EDIT I'm implementing my image capture as follows. First I initialise a