uiimagepickercontroller

Save image to camera roll with UIImageWriteToSavedPhotosAlbum

谁都会走 提交于 2019-12-30 02:29:09
问题 I am trying to save a photo with a button to camera roll after user capture a picture with Camera , but I don't know why my picture doesn't save at photo library !! Here is my code : -(IBAction)savePhoto{ UIImageWriteToSavedPhotosAlbum(img.image,nil, nil, nil); } -(IBAction)takePic { ipc = [[UIImagePickerController alloc]init]; ipc.delegate = self; ipc.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:ipc animated:YES]; } - (void)imagePickerController:

How to select a portion of an image, crop, and save it using Swift?

允我心安 提交于 2019-12-29 21:07:48
问题 I am trying to create an iOS app using Swift to capture images and let the user save a selected portion of the image. In many cam based apps, I noticed that a rectangular frame is offered to let the users choose the desired portion. This involves either sliding the edges of the rectangle or moving the corners to fit the required area. Could you please guide me on how to implement that moveable rectangle and how to save only that piece of the image? 回答1: Using Swift 3 Image cropping can be

UIImagePickerController bug

自古美人都是妖i 提交于 2019-12-29 19:49:11
问题 I think I found a bug in latest iOS 7 by running an app with Base SDK set to iOS 6.1 (possibly even lower versions too, haven't tested that out yet) I have this image in my photo library: http://i.imgur.com/7KUIGLt.jpg I present a UIImagePickerController via: UIImagePickerController *vc = [[UIImagePickerController alloc] init]; vc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; vc.delegate = self; vc.allowsEditing = YES; [self presentViewController:vc animated:YES completion:nil];

Memory Warning UIImagepickerController IOS 7

最后都变了- 提交于 2019-12-29 18:51:26
问题 Could anybody help me with this issue I'm a bit new to objective c and iOS. I've been working on it but I can't figure out how to fix the problem, My app is really simple it only start the camera take pictures and send them through email to our server. This code was working just fine in iOS6. When I take pictures my memory is heap growth with each screen capture and I get "Received Memory Warning" and finally - Terminated due to Memory Pressure. - -(void)imagePickerController:

Overriding iPhone shutter sound through SDK

旧城冷巷雨未停 提交于 2019-12-29 08:09:10
问题 In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser). 回答1: I am quite certain it's not possible. AFAIK, Red Laser doesn't actually take a "normal" picture but uses UIGetScreenImage() (undocumented but

Help debugging iPhone app - EXC_BAD_ACCESS

时间秒杀一切 提交于 2019-12-29 08:08:12
问题 I've developed my application using my 3G device to test with. Upon giving this to a friend to test, he's noticed that it crashes..I've had a look at the crash log, but it's not much use except for the "EXC_BAD_ACCESS" statement after a few memory warnings. On my device, I can use the imagePicker lots, and each time a photo is taken I get a memory warning, but this doesn't cause any problems. On my friend's device (also a 3G), after a couple of images chosen from the camera, the app crashes.

How to use UIImagePickerController in iPad?

為{幸葍}努か 提交于 2019-12-28 02:52:16
问题 Hi i am working on a universal application (iPhone/iPad). one feature is that i have to select a photo from album and show it on UIImageView. Now problem is that it is working good on iPhone but when i try to open photo album it crashes. my code in action sheet delegate is this: - (void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ if ( ([UIImagePickerController isSourceTypeAvailable

Camera with Custom View

自古美人都是妖i 提交于 2019-12-27 16:24:49
问题 My Application uses camera, I would like to add overlay over the camera preview. For example, I want to use a picture frame when I use Camera, also I would like to add a custom bar for camera operations. Kindly help me to do the same. 回答1: You might be trying using UIImagePickerController. But I know this one solution to your problem. You can do it easily using AVCamCaptureManager and AVCamRecorder classes. Apple has a demo program build on its developer site here. It is named AVCam. In

Camera with Custom View

丶灬走出姿态 提交于 2019-12-27 16:24:26
问题 My Application uses camera, I would like to add overlay over the camera preview. For example, I want to use a picture frame when I use Camera, also I would like to add a custom bar for camera operations. Kindly help me to do the same. 回答1: You might be trying using UIImagePickerController. But I know this one solution to your problem. You can do it easily using AVCamCaptureManager and AVCamRecorder classes. Apple has a demo program build on its developer site here. It is named AVCam. In

Draw overlay on camera iOS

浪尽此生 提交于 2019-12-27 00:43:29
问题 Users need to be able to take photo of their ID. I need to add a blue frame to camera view as a guide. Guide should have same aspect ratio on all device sizes and fit a label with instructions. Can I accomplish this using UIImagePicker? Here is some incomplete code. Thanks for any help. UIImageView *overlayImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]]; CGRect overlayRect = CGRectMake(0, 0, self.view.frame.size.height - 16, self.view.frame.size.width - 16); [overlayImage