uiimagepickercontroller

NSURL of UIImage from UIImagePickerController returns (null)

别说谁变了你拦得住时间么 提交于 2019-12-11 10:35:50
问题 - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editInfo { userURL = [editInfo objectForKey:UIImagePickerControllerMediaURL]; userImage = image; userImageView.image=userImage; [self dismissViewControllerAnimated:YES completion:nil];} I then take NSURL userURL, and put it in an UIActivityViewController to use to upload the image. However this never works, and always fails as it's trying to upload (null). However

Swift: how to prevent UIImagePicker method takePicture() from calling didFinishPickingMediaWithInfo

亡梦爱人 提交于 2019-12-11 10:22:41
问题 I am developing a customized overlay from my `UIImagePicker func prepareImagePicker() -> CustomOverlayView { self.imagePicker = UIImagePickerController() self.imagePicker.delegate = self self.imagePicker.sourceType = .Camera self.imagePicker.cameraCaptureMode = .Photo self.imagePicker.showsCameraControls = false self.imagePicker.modalPresentationStyle = .FullScreen //customView stuff let customViewController = CustomOverlayViewController( nibName:"CustomOverlayViewController", bundle: nil )

EXC_BAD_ACCESS using ARC and can't track on simulator

霸气de小男生 提交于 2019-12-11 09:38:46
问题 I have been building an app for a client and everything was going smoothly until I started getting this error. This is a unique situation, I've learned how to use instruments and NSZombie however I can't run instruments with NSZombieEnabled on the iPhone only on the simulator. I have to debug this problem in the iPhone because I'm using UIImagePicker to take a picture and the error happens shortly after I take the picture. I'm also using ARC so I can't set release or retain info at all, ARC

name of the picked image xcode

我们两清 提交于 2019-12-11 08:43:46
问题 I want to get the name of the image picked from the library or newly clicked in - -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info I am using this code: -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeSavedPhotosAlbum]) { AppDelegate *del = [[UIApplication sharedApplication

Orientation issue in Landscape mode while opening camera in iOS 7 in iPhone

南楼画角 提交于 2019-12-11 08:36:33
问题 I am having an app which is only in Landscape Mode. In my app I am opening the Camera from one of my views. It is working well for my iPad but on iPhone it crashes. It is working well in iOS 6 but the app crashes for iOS 7 and only for iPhone. Below is my code. if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { ipc=[[UIImagePickerController alloc] init ]; ipc.delegate=self; ipc.sourceType=UIImagePickerControllerSourceTypeCamera; [self

Swift - How can I get a list of all photos and videos on iPhone?

℡╲_俬逩灬. 提交于 2019-12-11 08:25:21
问题 I would like to be able to view a list of both photos and videos stored on the user's iPhone so I can allow them to select the file for upload. So far, I have it working where photos show up in the list, but no videos are showing up. The code I'm using to display the photos library is the following: @IBAction func btnAddPicOrVideo(sender: AnyObject) { let pickerC = UIImagePickerController() pickerC.delegate = self self.presentViewController(pickerC, animated: true, completion: nil) } As I

UIImagePickerController Subview Alternative

浪尽此生 提交于 2019-12-11 06:59:13
问题 I am looking to integrate the ability to select images from the built in library into an iOS app. UIImagePickerController seems like the obvious choice. However, it only works as a modal view controller. For design reasons, the image selection in this app needs to be part of an UIViewController itself. After some research on the web and searching the StackOverflow archives, it seems I will need to implement my own Image Picker from scratch using ALAssetsLibrary to access the images stored on

How to know I tap “taking photo button” with UIImagePicker

送分小仙女□ 提交于 2019-12-11 06:57:24
问题 There are three delegate method with UIImagePickerDelegate. (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info; This method tell you the piture you take. But when I tap the "taking photo button", how I know the event? 回答1: You should 1) subclass UIImagePickerController 2) set showCameraControls = NO 3) create your own controls on this ViewController's view 回答2: Xcode 7.3, iOS 9.3 My way is a bit hacky, but essentially I drill down

Uploading Image to PHP Server

断了今生、忘了曾经 提交于 2019-12-11 06:52:58
问题 -(IBAction)TakePhoto{ picker = [[UIImagePickerController alloc] init]; picker.delegate = self; [picker setSourceType:UIImagePickerControllerSourceTypeCamera]; [self presentViewController:picker animated:YES completion:NULL]; [picker release]; } -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { image = [info objectForKey:UIImagePickerControllerOriginalImage]; [imageView setImage:image]; [self dismissViewControllerAnimated:YES

how to select a picture from UIImagePickerController using Frank Cucumber?

痞子三分冷 提交于 2019-12-11 06:44:48
问题 I was trying to use BDD technique to check the import picture process using Frank in the iPhone Simulator. The problem is that I cannot call the last step of selecting an image from UIImagePickerControllerSourceTypePhotoLibrary source (launching the UIImagePickerController was very easy using "touch"-commands on a button). It always stuck in the progress when I can see the saved images in the Simulator. The Frank Symbiote said the object I wanna touch is a "PLAlbumViewCell" object. 回答1: I