uiimagepickercontroller

Swift iOS -UIImagePicker's Photo Library Is Presented On Simulator But Crashes (won't present) On Actual Device While Running Xcode

淺唱寂寞╮ 提交于 2019-12-10 17:13:16
问题 I'm on Swift 3, iOS 10.3, and Xcode 8.3.3. When I access the photo library on the simulator the UIImagePicker is presented with no problem and I can pick photos. As soon as I try to access the photo library on an actual device (iPhone 7+) the app crashes because the UIImagePicker won't get presented (I don't even get to the point to pick a photo). The odd thing is on an actual device the imagePicker presents the camera and I can take photos with no problem. Even though I didn't add it inside

How to pass image, from uiimagepickercontroller, into another scene's uiimageview

我的梦境 提交于 2019-12-10 16:34:51
问题 How do I save a UIImagePickerController camera image so I can send to CreateViewController scene's UIImageView ? HomeViewController (scene 1) has a button that loads UIImagePickerController and returns with an image from the camera. CreateViewController (scene 2) has an empty UIImageView . HomeViewController.h #import "CreateViewController.h" @interface HomeViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate> @property (strong, nonatomic)

UIImagePickerController in Storyboard: UIImagePickerControllerSourceTypePhotoLibrary displays black screen

徘徊边缘 提交于 2019-12-10 14:49:46
问题 I have a storyboard where I created a UINavigationController instance and set its custom class to UIImagePickerController . If I set imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera in prepareForSegue , everything works fine. If I set imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary in prepareForSegue , I get a mostly black screen with an empty gray bar on top that I can't dismiss: [future location of screenshot - I cannot post images] I can work around

UIImagePickerController in an existing UIPopoverController

独自空忆成欢 提交于 2019-12-10 14:49:14
问题 Is there a way to push the UIImagePickerController in an existing UIPopoverController's navigation controller? What I know is that you have to create a new popover and add the UIImagePickerController in it. But I have an existing popover with its navigation controller that should present the image picker. 回答1: Use setContentViewController:animated: on UIPopoverController 回答2: I believe the answer is no because the image picker brings its own navigation controller. And nesting two nav

UIImagePickerController,Check camera

一世执手 提交于 2019-12-10 14:48:21
问题 -(void)viewDidLoad { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { imagePicker = [[UIImagePickerController alloc] init]; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.showsCameraControls = NO; [self.view addSubview:imagePicker.view]; } else { // UIAlertView… } } -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; imagePicker.delegate = self; [self presentViewController:imagePicker animated:NO

Ipad UIImagePickerController and UIPopoverController error

廉价感情. 提交于 2019-12-10 13:50:03
问题 I am using this code to open a popover with imagepicker -(IBAction)photosAction:(id)sender { // dismiss any left over popovers here UIImagePickerController* picker = [[UIImagePickerController alloc] init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; picker.delegate = self; UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:picker]; self.popoverController = popover; popoverController.delegate = self; [popoverController

UIImagePickerController: didFinishPickingMediaWithInfo not being called

 ̄綄美尐妖づ 提交于 2019-12-10 13:36:51
问题 Hope you're all doing well. Wondered if anyone could help me understand why Xcode fails to play nice with me.... I have broken the code into sections below in order to allow me to select a profile photo from UIImagePicker: WORKS: Assigning the delegate class for both ImagePicker & NavigationController WORKS: Instantiating the UIImagePicker variable WORKS: Load ImagePickerViewController and enable to select an image FAILS: Added additional functions for closing and finishing picking with a

Disable the retake, play and use video screen UIImagePickerController

て烟熏妆下的殇ゞ 提交于 2019-12-10 13:13:24
问题 I am just wanting one screeen: When using the UIImagePickerController it uses two screens. But I don't want this one: Is this possible? 回答1: @Fahri is right AVFoundation is more flexible but if you want to stick with UIImagePickerController what you could do is turn off the camera control by setting showsCameraControls property to NO , then present your own view and custom methods. Change your code to: takeVideo - (IBAction)takeVideo:(UIButton *)sender { UIToolbar *toolBar=[[UIToolbar alloc]

App using UIImagePickerController freezes when selecting “Use Photo” after taking a photo

自古美人都是妖i 提交于 2019-12-10 13:00:45
问题 I'm working on a simple photo and video capture app right now. The app successfully allows the user to take a photo or video on a button press. However, as soon as you finish taking your photo or video, it gives 2 options: "Retake" and "Use Photo" or "Use Video", depending on which one you're using. If the user taps "Retake" then it just let's them retake a new photo or video, but when the user taps "Use photo" or "Use video" the screen freezes. If I exit the frozen app and go look in my

iPhone Camera Iris / Shutter stuck in closed position

核能气质少年 提交于 2019-12-10 12:29:14
问题 As the title states the app that I am developing has an issue that is caused only when the app is relaunched after entering the background. The camera iris or shutter gets stuck in the closed position. The funny thing is you can still take a picture but you cannot see the preview. Once the picture is taken, it is shown correctly in the view. This issue does not happen when the app is launched if the app is completely closed. I can take pictures, add effects and so on, every time the camera is