uiimagepickercontroller

UIImagepickercontroller: is it possible to change the sort order of the images in camera roll?

≡放荡痞女 提交于 2019-11-26 23:10:35
问题 Basically the app im working on would be a lot less of a pain if users didn't have to scroll to the very bottom of their camera roll to get their most recent photos, I want the most recent at the top, wouldn't this make sense anyway? Not sure why apple designed it this way, or if im just not realizing something. Thanks nick 回答1: If you don't mind adding an extra step of selecting the camera roll from an album list you can try changing your sourceType from SavedPhotoAlbums to PhotoLibrary:

Avoid Video Compression when Selecting Movie with UIImagePickerController?

不想你离开。 提交于 2019-11-26 22:57:36
问题 I'm using UIImagePickerController to allow my user to select a video from the asset library. When the user selects the "Choose" button on the second screen, the view displays a progress bar and a "Compressing Video..." message. Why is this happening? Is there some way I can avoid this compression operation? 回答1: Answer: There is currently no way to control how UIImagePickerController compresses the picked video. I just did some quick tests. Using a test app I created, I picked the same video

Creating an image format with an unknown type is an error Objective-C Xcode 8

这一生的挚爱 提交于 2019-11-26 22:57:23
问题 While choosing an image from the image picker in iOS 10 Objective-C and Xcode 8 . I am getting an error - Creating an image format with an unknown type is an error . It was ok for the previous version. Here is my code: UIImagePickerController* imgPicker=[[UIImagePickerController alloc] init]; imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; imgPicker.delegate = self; [self presentViewController:imgPicker animated:YES completion:nil]; and the delegate method to recive the

UIImage Saving image with file name on the iPhone

南笙酒味 提交于 2019-11-26 22:53:28
How can I save an image (like using UIImageWriteToSavedPhotosAlbum() method) with a filename of my choice to the private/var folder? Kenny, you had the answer! For illustration I always think code is more helpful. //I do this in the didFinishPickingImage:(UIImage *)img method NSData* imageData = UIImageJPEGRepresentation(img, 1.0); //save to the default 100Apple(Camera Roll) folder. [imageData writeToFile:@"/private/var/mobile/Media/DCIM/100APPLE/customImageFilename.jpg" atomically:NO]; UIImageWriteToSavedPhotosAlbum() is only used for saving to the photos camera roll. To save to a custom

Swift - UIImagePickerController - how to use it?

半城伤御伤魂 提交于 2019-11-26 22:43:04
问题 I am trying hard to understand how this works, but it's pretty hard for me. =) I have 1 view, there is one button and one small ImageView area for preview. The button triggers imagepickercontroller, and the UIView will display picked image. There is no error but the image doesn't show in the UIImageView area. var imagePicker = UIImagePickerController() @IBOutlet var imagePreview : UIImageView @IBAction func AddImageButton(sender : AnyObject) { imagePicker.modalPresentationStyle =

Cannot subscript a value of type '[String : Any]' with an index of type 'UIImagePickerController.InfoKey'

霸气de小男生 提交于 2019-11-26 22:23:09
问题 I'm using Apple's Swift iOS Tutorial. Which is throwing an error, Cannot subscript a value of type '[String : Any]' with an index of type 'UIImagePickerController.InfoKey' The function they defined is below. func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { // The info dictionary may contain multiple representations of the image. You want to use the original. guard let selectedImage = info[UIImagePickerControllerOriginalImage]

Set dimensions for UIImagePickerController “move and scale” cropbox

自作多情 提交于 2019-11-26 21:43:46
How does the "move and scale screen" determine dimensions for its cropbox? Basically I would like to set a fixed width and height for the "CropRect" and let the user move and scale his image to fit in to that box as desired. Does anyone know how to do this? (Or if it is even possible with the UIImagePickerController) Thanks! Not possible with UIImagePickerController unfortunately. The solution I recommend is to disable editing for the image picker and handle it yourself. For instance, I put the image in a scrollable, zoomable image view. On top of the image view is a fixed position "crop guide

iOS 10 - App crashes To access photo library or device camera via UIImagePickerController

廉价感情. 提交于 2019-11-26 21:42:35
问题 Below is my code to access photo library -(void)click_gallery { if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { UIImagePickerController *imgPicker= [[UIImagePickerController alloc] init]; UIColor* color = [UIColor colorWithRed:46.0/255 green:127.0/255 blue:244.0/255 alpha:1]; [imgPicker.navigationBar setTintColor:color]; imgPicker.delegate = self; imgPicker.allowsEditing = YES; imgPicker.sourceType =

Camera with Custom View

主宰稳场 提交于 2019-11-26 21:15:54
My Application uses camera, I would like to add overlay over the camera preview. For example, I want to use a picture frame when I use Camera, also I would like to add a custom bar for camera operations. Kindly help me to do the same. You might be trying using UIImagePickerController. But I know this one solution to your problem. You can do it easily using AVCamCaptureManager and AVCamRecorder classes. Apple has a demo program build on its developer site here . It is named AVCam. In simple words what it does is when you click to open the camera, it calls the classes and methods which are

iOS 5 GM: <Error>: More than maximum 5 filtered album lists trying to register. This will fail

可紊 提交于 2019-11-26 21:14:20
问题 I know this thread existed before, but was closed as only appearing in iOS5 beta 6. By now I have the Golden Master of iOS 5 on my phone and that error still appears. This is happening when I create a UIImagePickerController with a sourceType of UIImagePickerControllerSourceTypePhotoLibrary more than 5 times. I am, as far as I can tell, creating and releasing the previous UIImagePickerController correctly each time. Edit: adding code, as requested. UIImagePickerController *ipc = [