uiimagepickercontroller

Push a viewController from the UIImagePickerController camera view

情到浓时终转凉″ 提交于 2019-12-04 03:16:42
I'm developing a messaging app (something like WhatsApp), users can send text and image messages to one another. when user wants to send an image, he can choose one from the camera roll or he can take one with the camera. This is how I present the UIImagePickerController for both cases: - (void)handleTakePhoto { UIImagePickerController *ipc = [[UIImagePickerController alloc] init]; ipc.delegate = self; ipc.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:ipc animated:YES]; [ipc release]; } - (void)handleChooseFromLibrary { UIImagePickerController *ipc = [

How do I use the updated UIImagePickerControllerDelegate iOS 12 API?

喜你入骨 提交于 2019-12-04 02:29:42
问题 How do I use the updated UIImagePickerControllerDelegate API since it changed to [UIIMagePickerController.InfoKey : Any] ? This part has been updated. I also searched here and I could not find an answer. import UIKit class adicionarNovoItemVc: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { @IBOutlet weak var textFieldNome: UITextField! let imagePicker = UIImagePickerController() @IBOutlet weak var namePreview: UILabel! @IBOutlet weak var imagePreview:

GeoTag Images from image picker swift 3

只愿长相守 提交于 2019-12-04 02:29:20
问题 I want to get geotag location from image which is selected from image picker. I am using this code if picker.sourceType == UIImagePickerControllerSourceType.PhotoLibrary { if let currentLat = pickedLat as CLLocationDegrees? { self.latitude = pickedLat! self.longitude = pickedLong! } else { var library = ALAssetsLibrary() library.enumerateGroupsWithTypes(ALAssetsGroupAll, usingBlock: { (group, stop) -> Void in if (group != nil) { println("Group is not nil") println(group.valueForProperty

iOS 7.1 imagePicker CameraFlashMode not indicating Flash state

北城余情 提交于 2019-12-04 02:10:57
I have iPhone application which overlays the camera with custom view. I have a button to switch between camera flash mode, this is the code switch ([self.imagePickerController cameraFlashMode]) { case UIImagePickerControllerCameraFlashModeAuto: [self.imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeOn]; return @"On"; break; case UIImagePickerControllerCameraFlashModeOn: [self.imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeOff]; return @"Off"; break; case UIImagePickerControllerCameraFlashModeOff: [self.imagePickerController

Objective c - ios : How to pick video from Camera Roll?

走远了吗. 提交于 2019-12-04 01:05:42
I try this : UIImagePickerController *videoPicker = [[UIImagePickerController alloc] init]; videoPicker.delegate = self; videoPicker.modalPresentationStyle = UIModalPresentationCurrentContext; videoPicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; videoPicker.mediaTypes = @[(NSString*)kUTTypeMovie, (NSString*)kUTTypeAVIMovie, (NSString*)kUTTypeVideo, (NSString*)kUTTypeMPEG4]; videoPicker.videoQuality = UIImagePickerControllerQualityTypeHigh; [self presentViewController:videoPicker animated:YES completion:nil]; but it only show videos from photos part not all video in

if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction [duplicate]

前提是你 提交于 2019-12-04 00:54:15
问题 This question already has answers here : iOS 10: “[App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction” (6 answers) Closed 2 years ago . I am using UIImagePickerController with Camera type. When I first opens the image picker controller it works fine, But after open the image picker vc, when i rotate the device, It shows the "[App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction" & there is

Force UIImagePickerController to Crop a Square Image

不打扰是莪最后的温柔 提交于 2019-12-04 00:22:25
How do we force UIIImagePickerController to crop a square image? I have searched all over and I haven't found a solid solution. Thankyo var imagePickerController: UIImagePickerController = UIImagePickerController(); imagePickerController.allowsEditing = true; imagePickerController.delegate = self; imagePickerController.sourceType = sourceType; func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage!, editingInfo: [NSObject : AnyObject]!) { profilePictureSelected = true; profilePictureImageView.image = image; picker.dismissViewControllerAnimated(true,

ios: Adding real time filter effects to photos

£可爱£侵袭症+ 提交于 2019-12-03 22:23:08
问题 I want to program an ios app that takes photos but I would like to filter the photo preview in real time. What I mean is implemented in the app called "CamWow" (here is a video of the app: http://www.youtube.com/watch?v=L_o-Bx08YZE ). I curious how this can be done. Has anybody an idea how to build such an app that provides a filtered real time preview of the photo and captures a filtered photo? 回答1: As Fraggle points out, on iOS 5.0, you can use the Core Image framework to do image filtering

Custom “Use”, “Cancel”,“Retake” and “Reverse Camera” button event using UIImagePickerController

爷,独闯天下 提交于 2019-12-03 22:07:10
I am making a custom photo picker. so i have used imagePickerController.showsCameraControls = NO; And i have created one camera overlay view and use imagePickerController.cameraOverlayView = overlayView; So, I need to implement custom button option, Can anyone please tell me how can i give customize button event using UIImagePickerController? Thanks in advance. You can build a UIViewController, take it's view as the image picker's overlayView. All your custom buttons are controlled by this UIViewController. e.g. UIButton *myBtn = [[UIButton alloc] initWithFrame:btnFrame]; [myBtn addTarget:self

UIImagePickerController - How do I access the front facing camera by default?

你离开我真会死。 提交于 2019-12-03 22:06:52
I am bringing up the camera with the following code from my ViewController: - (void)viewDidLoad { self.imgPicker = [[UIImagePickerController alloc] init]; self.imgPicker.sourceType = UIImagePickerControllerCameraDeviceFront; self.imgPicker.delegate = self; } - (IBAction)grabCamera { [self presentModalViewController:self.imgPicker animated:YES]; } How can I make it so the camera by default uses the front camera of the iPhone4 and not the back camera? I tried DeviceFront to no avail. Also, How can I add a subview (half sized) ontop of this camera after grabCamera is pressed? If I have this