uiimagepickercontroller

Attempt to add read-only file at path file:///var/mobile/Media/PhotoData/Photos.sqlite?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-01 11:34:28
问题 I have just updated to the new Xcode beta 6.0 and when trying to compile for an ipad mini with iOS 8 I am getting a weird error in the console: "Attempt to add read-only file at path file:///var/mobile/Media/PhotoData/Photos.sqlite?readonly_shm=1 read/write. Adding it read-only instead. This will be a hard error in the future; you must specify the NSReadOnlyPersistentStoreOption" This happens when executing the following code: if ([self.rootDelegate respondsToSelector:@selector

Save photo with geolocation data to photo library Swift 3

非 Y 不嫁゛ 提交于 2020-01-01 11:01:14
问题 How can I save a photo to photo library with geolocation metadata? I have requested (and allowed) the app to access user location: private func allowAccessToUserLocation() { locationManager = CLLocationManager() locationManager.delegate = self locationManager.requestWhenInUseAuthorization() } Do I need to ask for specific premissions for the camera app? EDIT: I use UIImagePickerController to take photos from within the app. All photos taken from within the app are stored in the photo library

How to use UIImagePickerControllerCropRect

不羁的心 提交于 2020-01-01 09:14:49
问题 I just figured out a way to change rect for crop box which appears after capturing an image from UIImagePickerViewController . This can be done with help of UIImagePickerControllerCropRect . But I have no idea how to use it. Originally the crop box is square. I want it to be rectangular. Can someone share an example with me? 回答1: You cannot do this using the built in UIImagePickerController functionality. Unfortunately, you can't control the size of the crop box. Here is a project on github

iOS 7.1 imagePicker CameraFlashMode not indicating Flash state

强颜欢笑 提交于 2020-01-01 08:24:09
问题 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];

How to access camera flash on UIImagePickerController?

时光怂恿深爱的人放手 提交于 2020-01-01 03:14:10
问题 I would like to know how to switch on the camera flash on the iPhone 4 with UIImagePickerController. if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerCameraDeviceFront] == YES) { /// What code here /// } else { NoFlash = [[UIAlertView alloc] initWithTitle:@"Uh-Oh" message:@"Your device doesn't have a flash camera" delegate:nil cancelButtonTitle:@"mhmm, OK" otherButtonTitles:nil]; NoFlash.delegate = self; [NoFlash show]; [NoFlash release]; } } I already read the

Dismissing of UIImagePickerController dismisses presenting view controller also

百般思念 提交于 2020-01-01 02:44:28
问题 I am working on a project that uses tabbar system. One of the item of tabbar is JobPostingViewController. I Embed it in UINavigationController. There is a UIButton called add new job in this view controller .I implemented pushviewcontroller to go CreateJobPostViewController. There I need to add UIImagePickerController to choose the image. When i tap done button or choose an image from library it dismisses to JobPostingViewController. But it should go to the CreateJobPostViewController. Any

Optimizing iPhone photo-taking speed, UIImagePickerController

不打扰是莪最后的温柔 提交于 2020-01-01 00:57:32
问题 I'm using the UIImagePickerController in my app. Has anyone used any optimization tricks for picture-taking latency? I don't need to store them to the library. I simply want to capture the pixel data and destroy the image object after making a calculation. Also, is there a way to hide the lens when it loads? (Worst case, I could mask the lens on camera startup and mask the frozen image upon saving/calculating.) EDIT: I've already set showsCameraControls = NO; . This hides the lens effect

Enabling the photo library button on the UIImagePickerController

点点圈 提交于 2019-12-31 10:34:55
问题 Does anyone know how to enable the photo album button on the UIImagePickerController when its in the camera mode? Like how the camera app on on the iphone can toggle between image and video taking and also has the button to view the photo library? 回答1: I'm afraid that this can't be done in that easy way (just enable or disable some magic feature). For some simple requirement, you can use cameraOverlayView and showsCameraControls to make the implementation. If you want to switch between photo

iOS - How to customize the crop rect in UIImagePickerController with allowsEditing on?

烂漫一生 提交于 2019-12-31 10:30:14
问题 Is there any way to define the crop area rect using the camera image picker? 回答1: Unfortunately, no. You have to implement a custom cropping GUI to get anything other than the default, as stated in the Camera Programming Topics for iOS: "When using built-in editing controls, the image picker controller enforces certain options. For still images, the picker enforces a square cropping as well as a maximum pixel dimension. For movies, the picker enforces a maximum movie length and resolution. If

UIImageView does not show Image from UIImagePickerController

感情迁移 提交于 2019-12-31 06:25:59
问题 I am trying to take a picture with my app and then show it in a UIImageView that is predefined in my .xib. I have a IBOutlet UIImageView *_foto that is linked to the UIImageView in the .xib When I do the following the picture doesnt show in the UIImageView after taking a picture: - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { _foto.image = image; //Also tried set image, and resizing the image