uiimagepickercontroller

Get Camera Roll photos to a Custom Collection View

限于喜欢 提交于 2020-02-01 05:38:27
问题 I have an Custom Collection View with Cells. Here is my CollectionView code. - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath; { Cell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"MY_CELL" forIndexPath:indexPath]; return cell; } I want to get images from Camera Roll & display in these cells. How can I get Camera Roll images to view in this Cell? Should I use an array to store names of the images & then show them in the Cell

iPhone camera images are rotated when uploaded to web

风流意气都作罢 提交于 2020-01-29 04:52:04
问题 I'm using UIImagePickerController to take a photo in portrait mode on the iphone and save to the web. The photo appears in portrait on the phone, but rotates 90 degrees on the web. If I download the photo and look at it in Preview (mac) or Photoshop (mac or pc) it is in portrait again. In Windows Picture Viewer (pc) it's rotated to landscape. Do I need to apply a rotation transform to the image data before uploading? Will I then also need to remove the meta-data that's rotating it in

How to fix libraries showing in red in Xcode?

对着背影说爱祢 提交于 2020-01-25 10:47:08
问题 Sudently, in all my Xcode projects System libraries show in red and I don't know how to fix it. What I've tried: I deleted xcode as in this answer https://stackoverflow.com/a/33812614/5918849 restarted machine downloaded same version Xcode 8.3.3 from https://developer.apple.com/download/ opened .xcworkspace, General/Targets/Linked Frameworks and Libraries added all frameworks that were showing in red and built the project However, they still show in red. Why do I want to fix it? I have tried

Draw another image on a UIImage -

风格不统一 提交于 2020-01-24 22:52:23
问题 I am trying to implement a feature that draws an image at a specific point of a UIImageView. 1.) So the user makes a photo 2.) Photo gets displayed to the user in a UIImageView in "Aspect Fit" 3.) User clicks on the UIImageView to put a image at the tapped point 4.) Combined Image is displayed code: extension UIImage { func image(byDrawingImage image: UIImage, inRect rect: CGRect) -> UIImage! { UIGraphicsBeginImageContextWithOptions(size, false, 0) draw(in: CGRect(x: 0, y: 0, width: size

about the api of UIImagePickerController in iOS 5

落花浮王杯 提交于 2020-01-24 16:14:04
问题 I overlay the UIImagePickerController with my design, and i set the showsCameraControls = NO, the zoom bar will not show both in iOS 4 and iOS 5, but the function of zoom will work in iOS 5, I can use two of my fingers to zoom in/out, but I don't want this function, so how can i stop the zoom function? I can not find this API in iOS 5 developer file, so please help me.thanks 回答1: I am not sure what you mean by 'zoom'. Are you looking for -[UIImagePickerController allowsEditing]? Set it to NO,

iOS JPEG images rotated 90 degrees

天涯浪子 提交于 2020-01-23 08:39:07
问题 I am using picker view to select image from photo album. I use above code: -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{ updateImage = [info objectForKey:UIImagePickerControllerOriginalImage]; [self.view addSubview:[MUtility sharedObject].loadingView ]; [self dismissViewControllerAnimated:YES completion:nil]; } After that i upload to server and i use this code NSData *imageData = UIImageJPEGRepresentation(updateImage, 0.1);

From the results of UIImagePickerControlleHow, how do I get JPEG with metadata included in it?

我的未来我决定 提交于 2020-01-22 06:00:26
问题 On iOS 4.2 when I use UIImagePickerController to let the user select a image from the photo library these are the dictionary keys that are returned to me: 2011-03-02 13:15:59.518 xxx[15098:307] didFinishPickingMediaWithInfo: info dictionary: { UIImagePickerControllerMediaType = "public.image"; UIImagePickerControllerOriginalImage = "<UIImage: 0x3405d0>"; UIImagePickerControllerReferenceURL = "assets-library://asset/asset.JPG?id=1000000050&ext=JPG"; } Using one or more of these keys, how can I

UIImagePickerController crashes on iOS10

别来无恙 提交于 2020-01-21 01:01:49
问题 On presenting UIImagePickerController with photo library source on iOS10 , my app crashes. On iOS10 with camera source and on iOS9 with photo library and camera sources, the app does not crash. The app is written in Swift 2.2 and built by Xcode 7.3.1 . Why does the crash occur? let imagePicker = UIImagePickerController() imagePicker.sourceType = .PhotoLibrary imagePicker.allowsEditing = true imagePicker.delegate = self self.presentViewController(imagePicker, animated: true, completion: nil)

UIImagePickerController crashes on iOS10

我的未来我决定 提交于 2020-01-21 01:01:02
问题 On presenting UIImagePickerController with photo library source on iOS10 , my app crashes. On iOS10 with camera source and on iOS9 with photo library and camera sources, the app does not crash. The app is written in Swift 2.2 and built by Xcode 7.3.1 . Why does the crash occur? let imagePicker = UIImagePickerController() imagePicker.sourceType = .PhotoLibrary imagePicker.allowsEditing = true imagePicker.delegate = self self.presentViewController(imagePicker, animated: true, completion: nil)

Displaying UIImagePickerController within another UIView

杀马特。学长 韩版系。学妹 提交于 2020-01-20 08:17:25
问题 I've been working pretty extensively the last couple months with UIImagePickerController, particularly with the new capabilities in OS3.1 and newer to overlay views on-top of the camera view. This has worked just fine. However, I am currently working on a project where I'd like to be able to display the camera view of the UIImagePickerController within an existing view. Essentially, the exact opposite of what I've currently been doing. An example would be a View Controller with navigation