uiimagepickercontroller

iOS 9.3 can not get thumbnail from photo library using iPhone App running on iPad

余生颓废 提交于 2019-12-07 17:23:29
问题 We have had an iPhone App that's configured to run only as an iPhone App. One aspect of this App has been able to access the photo library without an issue whatsoever. That is until iOS9.3, where the iPad simulator, from iPad4 and up, will not display photo thumbs at all. It simply shows nothing other than a blank square where the thumb ought to be displayed. Now, the iPhone simulator works totally fine. Images thumbs are read into and by the ALAssetsLibary. I've learned that the

UIImagePickerController is not presenting correctly in iOS 8

时光总嘲笑我的痴心妄想 提交于 2019-12-07 16:31:25
问题 I'd like to present an UIImagePickerController with the following code: self.pickerController = [[UIImagePickerController alloc] init]; self.pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; self.pickerController.delegate = self; [self presentViewController:self.pickerController animated:YES completion:nil]; It's working fine for iOS 7 and below, but in iOS 8 I got the following glitch: While transitioning to the image picker controller (vertical cover animation),

Convert UIImage to tiff/tif file

无人久伴 提交于 2019-12-07 15:18:42
问题 In my iPhone app, I need to convert UIImage to tiff/tif file for calling some API with tif type of parameter. So I'm supposed to get the UIImage from iphone photo library or taking a photo from camera. Please let me know whether this conversion (UIImage to tif/tiff) is possible and if possible what would be the best way to do it. Thanks in advance. 回答1: ImageMagick runs on iOS and seems to fit the bill. However, I would consider modifying the API, assuming you have access to it. If the

uiimagepickercontroller didfinishpickingmediawithinfo NOT CALLED when selecting a video from the library

房东的猫 提交于 2019-12-07 14:06:44
问题 I am writing an app where the user can select photos and videos from the library. I want to implement my own video player when a video is selected but the app immediately starts the default video player that has the choose button. The didfinishpickingmediawithinfo function does not get called. This only happens when a video is selected. I can display a selected photo to screen because the delegate method gets called in the case of photo selection. Why is the delegate method for the picker not

How to add UIImagePickerController in UiView

ε祈祈猫儿з 提交于 2019-12-07 12:50:09
问题 How to add UIImagePickerController in UiView in TabBarApplication 回答1: It doesn't matter if you are in a tab, this code goes into the ViewController class for your view Create a picker when you want one UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; // configure it how you want Add the picker [self presentViewController:picker animated:YES completion:nil]; Your view controller needs to be declared like @interface YourViewController :

UIImagePickerController hiding status bar issue in iOS8

爷,独闯天下 提交于 2019-12-07 12:43:22
问题 I did this - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [[UIApplication sharedApplication] setStatusBarHidden:YES]; } and it is great in iOS7, but iOS8 have some trouble with transitions in navigation bar between views and says: Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted. So, is any known solution to that? 回答1: Try

iOS 7 UIImagePickerController navigationbar overlap

﹥>﹥吖頭↗ 提交于 2019-12-07 12:37:01
问题 I ran into a problem accessing photo library in iOS7 (iOS6 is OK). It seems navigation bar overlaps the photo album view, I tried to set picker.edgesForExtendedLayout = UIRectEdgeNone; but it doesn't work. UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { picker.edgesForExtendedLayout = UIRectEdgeNone; } [self

UIImagePickerControllerCameraDeviceFront only works every other time

ぐ巨炮叔叔 提交于 2019-12-07 12:03:00
问题 In my app I'm attempting to use the front camera by default in a UIImagePicker . I know, seems simple enough... imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront; Now, the first time I launch my picker everything works fine and the front camera is initialized, but when the picker is dismissed, and presented again the back camera is used. From there on out if I continuously open and close the picker the camera used will be: front, back, front, back, front, back... I've

IOS UIImagePicker with mp4 format

痞子三分冷 提交于 2019-12-07 11:02:41
问题 Is it possible to save video and add it to custom ALAsset, captured from UIImagePicker in mp4 format? Or I have to save it in .mov and make compression by AVAssetExportSession? 回答1: Yes, you can compress video using AVAssetExportSession . Here you can specify video type, quality and output url for compress video. See below methods: - (void) saveVideoToLocal:(NSURL *)videoURL { @try { NSArray *documentsDirectory = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

cameraOverlayView above Shutter animation

心已入冬 提交于 2019-12-07 10:13:06
问题 I have a transparent view with a rectangle drawn onto it using CoreGraphics. When the camera launches the custom overlay view is above the shutter animation. What you see is the standard camera shutter with the custom rectangle above it. How do I get it to go in the right place, underneath the shutter animation? I've looked at other sample code but it's for OS 3.1 and doesn't seem to do anything differently. Here's my code: -(IBAction)cameraButton{ if ([UIImagePickerController