uiimagepickercontroller

How to receive bytes when video is recording

房东的猫 提交于 2019-12-20 05:57:33
问题 i am developing iphone video app,in that i want to get bytes occupied in disk when user is recording the video itself . - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info; this method is called after user is finished picking.is there any method 回答1: UIImage *img = [UIImage imageNamed:@"sample.png"]; NSData *imgData = UIImageJPEGRepresentation(img, 0); NSLog(@"Size of Image(bytes):%d",[imgData length]); 回答2: NSData *data = [info

UIImagePickerController in UIPopoverController - location not working

谁说我不能喝 提交于 2019-12-20 04:53:45
问题 In an iPad app I'm writing I have button in a static table cell that launches an image picker inside a popover. I want the popover's arrow to point at the button that launched the popover. Right now, when I tap the button it doesn't. It throws the popover on screen (with the working image picker) but the arrow either points to the top of the screen or kind of anywhere else (can't figure out if it's random or not--see below). The tableview that holds the static cell that contains the button

why swift use a struct as dictionary key instead of a string here?

ε祈祈猫儿з 提交于 2019-12-20 03:08:14
问题 Why UIImagePickerController.InfoKey type is struct not a string ,what is the benefit to use struct as a dictionary key instead of string? public struct InfoKey : Hashable, Equatable, RawRepresentable { public init(rawValue: String) } } extension UIImagePickerController.InfoKey { public static let mediaType: UIImagePickerController.InfoKey public static let originalImage: UIImagePickerController.InfoKey // a UIImage public static let editedImage: UIImagePickerController.InfoKey // a UIImage

How to get gallery images in iOS?

前提是你 提交于 2019-12-19 10:12:59
问题 I have the task to implement something similar to UIImagePickerController for displaying and selecting images. The problem is to get the list of images on the device. I can't find any solution to get the images. So is there the way to get images? 回答1: On that post there is a refence there. It is looking interesting. If not what you seek, you can create your own UIImagePicker, and you will need to go through the Assets Library framework to get access to the photos of the iPhone The Assets

How to get Original Image and media type from PHAsset?

时光总嘲笑我的痴心妄想 提交于 2019-12-19 08:29:47
问题 My **GMImagePickerController** returns the list of selected images from photos app. The code are as follows. - (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickingAssets:(NSArray *)assetArray { NSLog(@"%@",assetArray); NSLog(@"GMImagePicker: User ended picking assets. Number of selected items is: %lu", (unsigned long)assetArray.count); } The assetArray return result like this, I selected 3 images from photos app ( "<PHAsset: 0x7fa39e02e840> 1AEEF04A-F8AB-4019-AAB5-

How to get Original Image and media type from PHAsset?

这一生的挚爱 提交于 2019-12-19 08:29:07
问题 My **GMImagePickerController** returns the list of selected images from photos app. The code are as follows. - (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickingAssets:(NSArray *)assetArray { NSLog(@"%@",assetArray); NSLog(@"GMImagePicker: User ended picking assets. Number of selected items is: %lu", (unsigned long)assetArray.count); } The assetArray return result like this, I selected 3 images from photos app ( "<PHAsset: 0x7fa39e02e840> 1AEEF04A-F8AB-4019-AAB5-

Dismiss UIImagePickerController

纵然是瞬间 提交于 2019-12-19 04:00:43
问题 I have tried every variation of dismissing a UIImagePickerController with out any luck. What am i doing wrong. - (IBAction)choosePhoto { self.picker = [[UIImagePickerController alloc] init]; self.picker.delegate = self; self.picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:self.picker animated:YES]; } - (void)imagePickerControllerDidCancel:(UIImagePickerController *)imagePicker { NSLog(@"dismiss image picker"); [self

detecting when user starts video recording

时光总嘲笑我的痴心妄想 提交于 2019-12-19 03:42:30
问题 I have a UIImagePickerController which I use to record video. now i want to detect when the user taps on record button. the delegate doesn't provide any such callback. Is there any good way to find out when the video is being recorded? 回答1: You’re right: the delegate doesn’t receive any information on when video capture is happening. The easy solution is to simply roll your own camera controls—setting the showsCameraControls property to NO and providing your own controls in a custom view with

UIImagePickerController leaking memory after launch and during taking a picture. Makes app crash after taking more than a 100 pictures

不打扰是莪最后的温柔 提交于 2019-12-19 03:13:28
问题 I have been struggling with this issue for weeks now. I have look online all over the place and found nothing close to this issue other than this 2 outsider links: https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview/issues/200 https://issues.apache.org/jira/browse/CB-11784 But those are not using the same environment and there is no actual solution to the problem. Here is a screenshot of my Instrumentals using Xcode 8.3 right after I launch the imagePicker and take

When saving recorded video that is too long, app crashes

二次信任 提交于 2019-12-19 03:12:07
问题 The problem: When saving a video that is recorded in my app, if the video size/duration is too big/long, my app crashes without a log/exception. My Setup: In my App I use a UIImagePickerController to record videos. Now I have noticed that if I make my videos very long in length (for example 30minutes with UIImagePickerControllerQualityTypeMedium, or more than a minute with UIImagePickerControllerQualityTypeIFrame1280x720), when saving the video, the app crashes. Sometimes with and sometimes