uiimagepickercontroller

How to get UIImagePicker selected image name?

主宰稳场 提交于 2019-12-18 17:36:13
问题 Does anyone know how to get the selected image name (the one from photo gallery) after presenting an UIImagePickerController? 回答1: With the help of ALAsset you can able to achieve this. Step 1: Get the Asset for the selected Image from the UIImagePicker Step 2: Get the ALAssetRepresentation for that Asset . Step 3: ALAssetRepresentation class has a property called fileName - (NSString *)filename Returns a string representing the filename of the representation on disk. This Sample Code will

UIImagePickerController cameraViewTransform acts differently in iOS 4

限于喜欢 提交于 2019-12-18 13:37:38
问题 I upgraded both my iPhone and SDK to iOS 4.0.1 and now my App doesn't run the same way it was running in iOS 3.x. My App uses the UIImagePickerController with a custom cameraOverlayView (which I'll suppress in this post). The main point is that I need to see the iphone camera in fullscreen mode. To go straight to the problem, I'll put some code and screenshots to explain what's happening. I created a View-Based Application using the XCode Template projects named "CameraTransform", so I got

Creating our own crop rect in camera overlay

谁说我不能喝 提交于 2019-12-18 13:36:33
问题 I want to state my basic requirement which is to change the frame for crop rect in UIImagePickerController for a camera. I just realized that it is not possible to change frame for crop rect. That leaves me with only one option i.e to create my own camera overlay wherein I can set frame for crop rect. I searched a lot but found nothing. I asked previously but didn't get anything. I don't even know is it possible and if yes then how to create it and move the crop box, scale it in accordance to

Using cameraOverlayView with UIImagePickerController

99封情书 提交于 2019-12-18 13:13:18
问题 I know this has been asked a number of time but I can't find an answer. I have an app that uses the UIImagePickerController to take a picture. The problem is that I only want the camera option to be available and I understand that I need to hide the standard controls: cameraUI.showsCameraControls=NO; and use a cameraOverlayView to provide my own controls. I have had a look at Apple's PhotoPicker project already and my initial problem is how do I get an Overlay object onto my storyboard? I can

Photo taken with camera does not contain any ALAsset metadata

☆樱花仙子☆ 提交于 2019-12-18 12:30:49
问题 The weirdest thing is happening. I have an action sheet which gives the user the choice to either take a photo with the camera or choose one from the camera roll. Upon the UIImagePicker returning from selection I use the ALAssetsLibrary to determine the GPS information embedded in the photo. Choosing a photo from the camera roll works perfectly and I am able to retrieve the GPS information. However, taking a photo with the camera provides absolutely no GPS information, in fact I have no

Photo taken with camera does not contain any ALAsset metadata

守給你的承諾、 提交于 2019-12-18 12:30:15
问题 The weirdest thing is happening. I have an action sheet which gives the user the choice to either take a photo with the camera or choose one from the camera roll. Upon the UIImagePicker returning from selection I use the ALAssetsLibrary to determine the GPS information embedded in the photo. Choosing a photo from the camera roll works perfectly and I am able to retrieve the GPS information. However, taking a photo with the camera provides absolutely no GPS information, in fact I have no

How to make UIImagePickerController StatusBar lightContent style?

僤鯓⒐⒋嵵緔 提交于 2019-12-18 11:56:26
问题 When I present the ImagePickerController the statusBar text color is still black, how to make like this? 回答1: Just three steps: 1: Add UINavigationControllerDelegate , UIImagePickerControllerDelegate to your @interface yourController ()<> 2: imagePickerController.delegate = self; 3: -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [[UIApplication sharedApplication] setStatusBarStyle

Objective C: How to fix aspect ratio of image (and not change to fit imageview frame)

♀尐吖头ヾ 提交于 2019-12-18 11:47:16
问题 I am using the UIImagePickerController to select images for my app. However I am facing some challenges with regards to maintaining aspect ratio of the selected images For example, I have a raw image on the phone as follows (not square image): After selecting the image on iphone via the 'move and scale' page to crop image, the result is as follows: (aspect ratio is still maintained here) My app will display the selected image in a UIImageView with a square frame (200 x 200). After setting the

How to pick multiple images from UIImagePickerController in ios

一世执手 提交于 2019-12-18 11:41:12
问题 I am trying to simply enable picking multiple images from photolibrary using the UIImagePickerController .I'm relatively new to XCode and I don't understand how to allow the user to pick multiple images from the UIImagePickerControler . This is my current code.Please help any body how to pick multiple images from UIImagePickerController . -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { switch(buttonIndex) { case 0: [self takeNewPhotoFromCamera];

Upload picture selected using UIImagePickerController

江枫思渺然 提交于 2019-12-18 09:34:19
问题 I'm trying to upload the picture selected using UIImagePickerController. The UIImagePickerController gives UIImage object that I can display in a view, but it doesn't give a path (may be it does and I'm looking at wrong place). I'm using ASIFormDataRequest to upload content, but this would need path to the picture to upload it. Any suggestion ? Thank you 回答1: If you have UIImage with you than you don't need local path for image to upload, you can upload it using following code. NSData