uiimagepickercontroller

How to get image path from photo library and how to retrieve the image from photo library in iphone?

怎甘沉沦 提交于 2019-11-26 20:58:22
问题 I'm new to iphone. In my small application, how to get image path from photo library. I use this following code to getting images and placed in imageview. -(IBAction) selectimage { UIImagePickerController *picker=[[UIImagePickerController alloc] init]; picker.delegate=self; picker.sourceType=UIImagePickerControllerSourceTypeSavedPhotosAlbum; [self presentModalViewController:picker animated:YES]; [picker release]; } -(void) imagePickerController:(UIImagePickerController *)UIPicker

Force landscape orientation in UIImagePickerController

一个人想着一个人 提交于 2019-11-26 20:50:14
I'm new to iOS development, and Im developing my first app. (so sorry if Im asking a newbie question) My app is all in portrait orientation, except to the place where I'm using UIImagePickerController to take a picture to be used in the app, what I'm doing is: UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeImage]; picker.allowsEditing = NO; [self presentModalViewController:picker animated:YES]; As my app is in Portrait ,

How to avoid compression after selecting video from UIImagePickerController in ios

大城市里の小女人 提交于 2019-11-26 20:23:34
问题 I am using UIImagePickerController to select video from Gallery and it compress that video.I want to disable Compression but I don't find the way to do this. I also tried with ELCImagePickerController it is showing video but it is looking like an image only there is no video icon or time duration like it shows in UIImagePickercontroller.How can I do it? Thanks. 回答1: With iOS 11 you can set the property videoExportPreset to AVAssetExportPresetPassthrough to get the original: if #available(iOS

UIImagePickerController AllowsEditing not working

主宰稳场 提交于 2019-11-26 20:17:10
问题 I am using UIImagePickerController to allow the user to take a picture. I want to allow him to edit it afterwards but whatever I am doing i get nothing. Here is my code (I am using Xamarin): UIImagePickerController imagePicker = new UIImagePickerController (); // set our source to the camera imagePicker.SourceType = UIImagePickerControllerSourceType.Camera; // set what media types //imagePicker.MediaTypes = UIImagePickerController.AvailableMediaTypes (UIImagePickerControllerSourceType.Camera)

Hide/Show iPhone Camera Iris/Shutter animation

守給你的承諾、 提交于 2019-11-26 19:54:51
问题 I am not able to Hide the iphone Camera shutter opening animation for my app. I am using UIImagePickerController to access iphone camera and using my own overlay controllers. Is there a way to remove the initial shutter(also known as Iris) animation as the camera starts. Thank You [EDIT] For those who wants to know the way to change the camera iris animation. The below function is called before the camera iris animation starts. - (void)navigationController:(UINavigationController *

iOS Custom UIImagePickerController Camera Crop to Square

為{幸葍}努か 提交于 2019-11-26 18:53:10
问题 I'm trying to create a camera like Instagram where the user can see a box and the image would crop to that box. For Some reason the camera doesn't go all the way to the bottom of the screen and cuts off near the end. I'm also wondering how would I go about cropping the image to be 320x320 exactly inside that square? 回答1: Here's the easiest way to do it (without reimplementing UIImagePickerController ). First, use an overlay to make the camera field look square. Here's an example for 3.5"

Presenting a modal view controller immediately after dismissing another

风流意气都作罢 提交于 2019-11-26 18:02:49
问题 I'm dismissing a modal view controller and then immediately presenting another one, but the latter never happens. Here's the code: [self dismissModalViewControllerAnimated:YES]; UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; [self presentModalViewController:picker animated:YES]; The first modal VC slides down, but the new picker never comes up. Any idea as to what's going

UIImagePickerController Memory Leak

安稳与你 提交于 2019-11-26 17:46:31
问题 I am seeing a huge memory leak when using UIImagePickerController in my iPhone app. I am using standard code from the apple documents to implement the control: UIImagePickerController* imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { switch (buttonIndex) { case 0: imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; [self

iPhone - UIImagePickerControllerDelegate inheritance

狂风中的少年 提交于 2019-11-26 17:41:16
问题 I have added a UIImagePickerController to a UIViewController . I have also assigned the UIImagePickerControllerDelegate to that UIViewController . When I execute the following line, myPicker.delegate = self; Xcode gifts me with the following message: warning: assigning to id from incompatible type 'RootViewController' Then I added the UINavigationControllerDelegate protocol to the same UIViewController and the error message vanished. So, do I have to add both protocols to the UIViewController

iOS 7 UIImagePicker preview black screen

元气小坏坏 提交于 2019-11-26 17:40:40
问题 When i try to load camera from my code, camera preview is black. If I wait for 10-20 seconds it will show real camera preview. I found several questions and some of them suggest that running some other code in background should be the reason for this. However I don't have any code running in background. How should I fix this? This is my code where I run camera UIImagePickerController *photoPicker = [[UIImagePickerController alloc] init]; photoPicker.delegate = self; photoPicker.sourceType =