uiimagepickercontroller

iOS SDK - How to get the status bar back when using UIImagePickerController?

孤人 提交于 2019-11-27 02:34:16
问题 As soon as I add a UIImagePickerController sub view to my view the status bar disappears and I can't get it back. Is there any way to keep the status bar visible? UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; [self.view addSubview:imagePicker.view]; [imagePicker viewWillAppear:YES]; [imagePicker viewDidAppear:YES]; [[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO]; 回答1: I had

how to change the UIImagePickerController crop frame

北城余情 提交于 2019-11-27 01:31:20
问题 when opening working with an UIImagePickerController and setting allowsImageEditing = YES; there is a default cropping frame that is 320x320. In my case, I would like to setup that cropping frame to 320x240 for images that are landscape, and 240x320 for images that are portrait. However, I haven't been able to find a way to change that 320x320 frame that is used when editing /cropping a photo. Has any of you found a way to do it? Thanks! 回答1: You have to implement it your self. The picker

Swift - How to record video in MP4 format with UIImagePickerController?

守給你的承諾、 提交于 2019-11-27 01:23:44
问题 I am creating a app in which i need to record videos and upload it to a server. Now my project has a android version too. To support android version i have to record the videos in mp4 format. I followed this tutorial to set the UIImagePicker media type to movie format imagePicker.mediaTypes = [kUTTypeMovie as String] The UIImagePickerController is perfect for my requirement and the only thing that i need to change is its saving format to mp4. I tried kUTTypeMPEG4 in mediaTypes but it throws

iPhone Get UIImagePickerController Lat/Lng

南楼画角 提交于 2019-11-27 01:10:42
问题 I'm using the UIImagePickerController to take a photo and then upload the photo to a WCF Service . Along with the image, I also need to send to the latitude and longitude of the photo. How can I get hold of this information from the photo taken? I've searched online but can't seem to find a good source of info. I've seen about the EXIF data that is passed through the UIImagePickerControllerMediaMetadata key as part of the didFinishPickingMediaWithInfo delegate method. However, when I print

iOS 7 UIImagePickerController has black preview

末鹿安然 提交于 2019-11-27 01:01:53
I have a UIImagePickerController being called with sourceType camera and 80% of the time I get a black preview. If I wait, let's say around 30 seconds, I get a good preview and it will be good for around 50% of the time, then it can break again. The image in question is very similar to this. iDevice camera shows black instead of preview Other people imply that GCD might be causing some issues with the camera, and that updates to the UI while the image picker is being loaded break it. I put a lock on every GCD block that calls the main thread for this purpose. This is an example of an image

UIImagePicker allowsEditing stuck in center

大憨熊 提交于 2019-11-27 00:56:23
I have a UIImagePicker that works perfect for a type of UIImagePickerControllerSourceTypePhotoLibrary, but when I use UIImagePickerControllerSourceTypeCamera, the editing box cannot move from the center of the image. So if the image is say taller than it is wide, the user cannot move the editing box to the top square of the image. Anyone know why this would be the case? It only happens when the source is from the camera, not the library. Edit: Some CODE!!! if (actionSheet.tag == 2) { if (buttonIndex == 0) { // Camera // Check for camera if ([UIImagePickerController isSourceTypeAvailable

How do I get the data from UIImagePickerControllerReferenceURL?

Deadly 提交于 2019-11-27 00:48:18
问题 I am using ELCImagePickerController in my app and I don't want to save the selected fullScreenImage to my array because if i selected 40 iPad images then that is not good. I want to get data from UIImagePickerControllerReferenceURL instead of UIImagePickerControllerOriginalImage from the dict of method - (void)elcImagePickerController:(ELCImagePickerController *)picker didFinishPickingMediaWithInfo:(NSArray *)info . I have tried: NSDictionary *dict = [info objectAtIndex:count]; NSData *data =

presentModalViewController:Animated is deprecated in ios6

拥有回忆 提交于 2019-11-27 00:08:21
问题 I am using the following code for an image picker. But when I run it in the simulator, I have a memory leak and I get a warning about presentModalViewcontroller:animated being deprecated in iOS6. I also get dismissModalViewController:animated deprecated. I'm using the SDK 6.1. Code for ImagePicker: - (void)showAlbum:(id)sender { imagePicker=[[UIImagePickerController alloc]init]; imagePicker.delegate = self; imagePicker.allowsEditing =NO; imagePicker.sourceType =

iOS 10 error [access] <private> when using UIImagePickerController

三世轮回 提交于 2019-11-26 23:46:34
I am using XCode 8 and testing with iOS 10.2 Beta. I have added the Photos, PhotosUI and MobileCoreServices frameworks to project. Very simple code: #import <Photos/Photos.h> #import <PhotosUI/PhotosUI.h> #import <MobileCoreServices/MobileCoreServices.h> @interface ViewController : UIViewController <UIImagePickerControllerDelegate, UINavigationControllerDelegate, PHLivePhotoViewDelegate> @property (strong, nonatomic) IBOutlet UIImageView *imageview; @end and implementation: - (IBAction)grab:(UIButton *)sender{ UIImagePickerController *picker = [[UIImagePickerController alloc]init]; picker

UIImageView not showing transparency of PNG Images from UIImagePickerController

徘徊边缘 提交于 2019-11-26 23:36:10
问题 I surely hope I am missing something because I do not understand why this is working the way it does. I have a PNG Image, which has a fully transparent background because I want to overlay it on other images inside a UIImageView . PNG images included in the XCode project all work fine as they should. The problem is when I select these same PNG images on the fly using UIImagePickerController and then assigning it to the UIImageView , for some really bizarre reason, it is not respecting it as a