uiimagepickercontroller

How to Add Properties For Image UIImagePicker Swift 4

a 夏天 提交于 2019-12-10 12:27:50
问题 I want to capture an image and add properties longitude and latitude, i tried several times every example available on StackOverflow but doesn't work. I use UIImagePickerController to capture image and UIImageWriteToSavedPhotosAlbum to save data to album The property must look like this But now my image looks like this below 回答1: I don't know about what you have tried so far and what is your requirement but according to your question here is an example of setting the location to image

UIImagePickerController's pushViewController misplace pushed view behind the navigation bar

馋奶兔 提交于 2019-12-10 12:00:45
问题 When I push a view controller into UIImagePickerController object, the view controller's view is misplaced behind the navigation bar. no matter what I choose as image picker source. I present image picker modally and do the following in its delegate - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [[UIApplication sharedApplication] setStatusBarHidden:NO]; [picker setNavigationBarHidden:NO]; SecondViewController *secondVC = [

Displaying a custom button on camera view

北战南征 提交于 2019-12-10 11:05:45
问题 Does anyone know if there's a way to stick a custom button on the camera view to allow a user to select a photo from their library like oink or instagram does without making a custom view? Thanks! Edit Adding the button seems easy with the overlay; does anyone know how to actually display the photo library from there and use what the person selects? 回答1: From the documentation for UIImagePickerController: You can customize an image picker controller to manage user interactions yourself. To do

How do I use [camera takePhoto] and edit using UIImagePicker - UIImagePickerController.allowsEditing = YES

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 11:00:21
问题 I'm going to feel dumb but I've searched everywhere and have not found an answer. I've been able to pull up the "edit" view using the default camera's controls. However I threw an overlay on it and I have a UIButton hooked up to IBAction take photo which looks like [UIImagePickerController takePicture]. However, it totally skips the editing part even though I set allows editing to YES. Is there another command to call it? Right now, it just goes straight to didFinishPickingMediaWithInfo.

set type of an image captured using iPhone camera

北城以北 提交于 2019-12-10 10:53:53
问题 If we capture a picture using iPhone camera, image will be saved in JPEG format by default. I would like to save the image captured in other formats like PNG. Is it possible? Is it possible to do this from code when we invoke iPhone camera from our application, can we set image type it has to be saved after capturing picture? I mean to open Camera and set the type before capturing picture? 回答1: This will help you to save image in png type -(void)imagePickerController:(UIImagePickerController

how to correct orientation of video in objective c

柔情痞子 提交于 2019-12-10 10:18:01
问题 I am using UIImagePickerController to capture video in iPhone but video is showing rotated 90 digree to right. How to fix this issue Is there any way by which we can correct the orientation. 回答1: you need make the re-encode video using AVExportSession to rotate video to correct orientation like said Oleksiy Ivanov. So you need something like this: NSError *error = nil; AVURLAsset *videoAssetURL = [[AVURLAsset alloc] initWithURL:self.videoUrl options:nil]; AVMutableComposition *composition =

Photo Library view stays on screen after choosing an image with UIImagePickerController

雨燕双飞 提交于 2019-12-10 09:26:27
问题 After I choose a picture through the UIImagePickerController interface from the Photo Library, the Photo Library view stays displayed, even though I've called dismissModelViewControllerAnimated in imagePickerController:didFinishPickingImage:editingInfo . Has anyone seen this? These are the three relevant methods I'm using: - (IBAction)choosePictureFromLibrary:(id)sender { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {

UIImagePickerController memory leak on iOS5

北战南征 提交于 2019-12-10 05:00:30
问题 i am using UIImagePickerController in my application developing on iOS5 & XCode4.2, getting memory leak and i don't have any idea why i am getting this leak can you please give me the answer for this. and my code: -(void)createImagePicker { _picker = [[UIImagePickerController alloc] init]; _picker.sourceType = UIImagePickerControllerSourceTypeCamera; _picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto; _picker.allowsEditing = YES; _picker.showsCameraControls = NO;

How to set photo taken with UIImagePickerController to be viewed/modified into a custom UIViewController?

天涯浪子 提交于 2019-12-10 03:14:55
问题 I am currently using the default UIImagePickerController , and immediately after a picture is taken, the following default screen is shown: My question is, how would I be able to use my own custom UIViewController to view the resultant image (and therefore bypass this confirmation screen ). Please note that am not interested in using a custom overlay for the UIImagePicker with custom camera controls or images from photo gallery, but rather just to skip this screen and assume that the photo

Skip UIImagePickerController Preview View?

只谈情不闲聊 提交于 2019-12-10 02:23:25
问题 I'm using UIImagePickerController to allow my user to select a video from the asset library. When the UIImagePickerController is initially displayed, it shows thumbnails for the various movies that have been recorded. Once the user selects a movie, it displays a "preview" view which allows them to playback and potentially edit the selected movie. Is there any way to avoid displaying this view and instead return the movie that was selected on the thumbnail screen? Here is the code I'm using: