uiimagepickercontroller

Saving Picked Image to CoreData

好久不见. 提交于 2019-12-17 03:47:14
问题 I am able to pick and display an image from the photo library, but my goal is to be able to save that picked image or file path to core data so that when that saved record is chosen that image will display also. I have CoreData working and I am able to display text from CoreData fine it is only the image holding me up. @IBAction func addPic(sender: AnyObject) { pickerController.delegate = self pickerController.sourceType = UIImagePickerControllerSourceType.PhotoLibrary // 2 self

iOS 8 Snapshotting a view that has not been rendered results in an empty snapshot

我只是一个虾纸丫 提交于 2019-12-17 03:21:34
问题 In iOS 8 I am having problem capturing images from camera till now I am using this code for UIImagePickerController *controller=[[UIImagePickerController alloc] init]; controller.videoQuality=UIImagePickerControllerQualityTypeMedium; controller.delegate=(id)self; controller.sourceType=UIImagePickerControllerSourceTypeCamera; [self presentViewController:controller animated:YES completion:nil]; But in iOS 8 I am getting this: Snapshotting a view that has not been rendered results in an empty

Resizing UIimages pulled from the Camera also ROTATES the UIimage?

混江龙づ霸主 提交于 2019-12-17 03:00:04
问题 I am getting UIimages from the camera and assigning them to UIImageViews to be displayed. When I do this the camera gives me a 1200 x 1600 pixel image which I then assign to a UIImageView in my Application. The image is displayed as expected in the image view under this condition. However, when I attempt to RESIZE the retrieved UIImage before assigning it to the UIImageView, the image is resizing as expected but there IS a problem in that somewhere (in the RESIZING code?) my UIImage is

Resizing UIimages pulled from the Camera also ROTATES the UIimage?

不羁岁月 提交于 2019-12-17 02:59:15
问题 I am getting UIimages from the camera and assigning them to UIImageViews to be displayed. When I do this the camera gives me a 1200 x 1600 pixel image which I then assign to a UIImageView in my Application. The image is displayed as expected in the image view under this condition. However, when I attempt to RESIZE the retrieved UIImage before assigning it to the UIImageView, the image is resizing as expected but there IS a problem in that somewhere (in the RESIZING code?) my UIImage is

How to get URL image in UIImagepickercontroller

廉价感情. 提交于 2019-12-14 04:19:06
问题 I want to get URL image in UIImagepickercontroller after take picture. I used following codes in didFinishPickingMedia.. NSData *webData = UIImagePNGRepresentation(image); NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *localFilePath = [documentsDirectory stringByAppendingPathComponent:png]; [webData writeToFile:localFilePath atomically:YES]; NSLog(@"localFilePath.%@"

UIImagePickerController does nothing when using camera after I hit “Use” button

社会主义新天地 提交于 2019-12-14 04:07:37
问题 Code below. When I hit the "Use" button after taking a picture ... the application becomes totally unresponsive. Any ideas what I'm doing wrong? The "addPlayer:" method is called when a button is pressed on the UIViewController's view. Thanks - (IBAction) addPlayers: (id)sender{ // Show ImagePicker UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; // If camera is available use it and display custom overlay view so that user can add as

How to call UIImagePickerController Delegate programmatically or forcefully [without user interaction]?

一个人想着一个人 提交于 2019-12-14 03:55:13
问题 In my app, i have Used UiimagepickerController for taking Video.in bettween my programm received any web service Which belongs to my app, i have to stop Video Capture and save video. i have Used StopVideoCapture to do above thing ,but it doesn't call delegate - ` (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info How to force call above delegate ??.or How to handle interruption Handling in UIImagePickerController`.. any idea? 回答1:

Overlaying a frame on the Camera View and then saving and using the resulting photo (what was captured and the overlay frame)

一曲冷凌霜 提交于 2019-12-14 00:24:15
问题 I would like to have a feature in my app that -lets you take a picture of yourself or other that has a fame eg "Wanted:" overlaid on it. -The user then would take the photo and the overlay and photo would be combined into one -The resulting image usable in code. Any ideas where to/how to start with this. Any tutorials etc. Cheers 回答1: It can get a little tricky, dealing with the transform applied to the preview of the image which makes it look a little different from the one you get handed by

How to access videos from Photo Album and play them?

心已入冬 提交于 2019-12-13 17:59:36
问题 Following code used to save videos to photo Album. else if ([mediaType isEqualToString:(NSString *)kUTTypeMovie]) { NSString *sourcePath = [[info objectForKey:@"UIImagePickerControllerMediaURL"]relativePath]; UISaveVideoAtPathToSavedPhotosAlbum(sourcePath,nil,nil,nil); } If it is video i want to play it if it is image i want to display it. Help Me. 回答1: with the code check if is image or video : NSString *mediaType1 = [info objectForKey:UIImagePickerControllerMediaType]; NSLog(@"mediaType : %