uiimagepickercontroller

UIImagePickerController not presenting in iOS 8

六月ゝ 毕业季﹏ 提交于 2019-11-27 09:24:21
问题 Is anyone else having an issue with UIImagePickerController in iOS 8? The method below works perfectly well in iOS 7 on an iPad, but I get the following error when I run this in XCode 6 (Beta 3 or 4) when I try to present the picker (last line). If it matters, the selection of the sourceType is coming from an alertView that is presented in the same place. Warning: Attempt to present <UIImagePickerController: 0x7c0ae400> on <CAGUCreateContactViewController: 0x7bf61a00> which is already

iPhone: Camera Preview Overlay

烈酒焚心 提交于 2019-11-27 09:05:12
问题 How do I add an overlay ( UIImageView ) to the camera preview and handle touches on this? My previous attempts to do this (e.g. use UIImagePickerController and add the image as a subview) have failed. 回答1: This tutorial explains it: http://www.musicalgeometry.com/?p=821 Just add a UIImage in the overlay view instead of the red area shown in the tutorial. 回答2: For your implementation file: - (IBAction)TakePicture:(id)sender { // Create image picker controller UIImagePickerController

UIImagePickerController working without NS Photo Library and Camera descriptions

僤鯓⒐⒋嵵緔 提交于 2019-11-27 08:59:20
问题 I am working with UIImagePickerController because I am creating an application that allows for the posting of images through both the photo library and camera. I created a basic demo that consists of a UIImageView, UIButton with some code to set up the UIImagePickerController. In addition, I have also set up (NSPhotoLibraryUsageDescription and NSCameraUsageDescription) in the plist section of Xcode. The image picking function works beautifully yet when I run the simulator I am not being

UIImagePickerController Memory Leak

浪子不回头ぞ 提交于 2019-11-27 08:46:02
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 presentModalViewController:imagePickerController animated:YES]; break; case 1: imagePickerController

How to use UIImagePickerController in iPad?

帅比萌擦擦* 提交于 2019-11-27 08:19:49
Hi i am working on a universal application (iPhone/iPad). one feature is that i have to select a photo from album and show it on UIImageView. Now problem is that it is working good on iPhone but when i try to open photo album it crashes. my code in action sheet delegate is this: - (void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ if ( ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])) { if (buttonIndex == 0) { [self lockAllImagesOnTheScreen];

Getting “Using two-stage rotation animation” warning with UIImagePickerController

流过昼夜 提交于 2019-11-27 07:53:23
I wrote simple code to test UIImagePickerController: @implementation ProfileEditViewController - (void)viewDidLoad { [super viewDidLoad]; photoTaker_ = [[UIImagePickerController alloc] init]; photoTaker_.delegate = self; photoTaker_.sourceType = UIImagePickerControllerSourceTypeCamera; photoTaker_.showsCameraControls = NO; } - (void)viewDidAppear: (BOOL)animated { [self presentModalViewController: photoTaker_ animated: NO]; } @end And I'm getting strange warnings like the following: 2010-05-20 17:53:13.838 TestProj[2814:307] Using two-stage rotation animation. To use the smoother single-stage

iOS 7 UIImagePicker preview black screen

允我心安 提交于 2019-11-27 07:36:16
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 = UIImagePickerControllerSourceTypeCamera; [self presentViewController:photoPicker animated:YES completion

iPhone - UIImagePickerControllerDelegate inheritance

南笙酒味 提交于 2019-11-27 07:35:56
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 when I add a UIImagePickerController ? If the UIImagePickerController is a subclass of

Perform “use photo” button on custom image picker overlay

≯℡__Kan透↙ 提交于 2019-11-27 07:00:05
问题 I am creating fully custom overlay for image picker controller. First stage is easy: I am get first view with record/take a shot button, which call takePicture() method. Next stage is change UI to "Retake" or "Use photo" which is also with my own design. "Retake" probably can be imitated by calling presentViewController again. How should I imitate "Use photo" button? 回答1: You can easily inherit UIImagePickerController Objective-C @interface CameraViewController : UIImagePickerController

iOS UIImagePickerController: Any way of getting the date of the chosen Picture?

最后都变了- 提交于 2019-11-27 06:23:20
问题 Within my application I am using an UIImagePickerController which calls - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info on success. The thing is, i need the date at which the image was taken. If the user shot a new picture i can take the current date of course, but what can I do in case the user chose a picture from his camera roll or another saved picture? 回答1: You can use this code for photos and videos fetched from albums.