uiimagepickercontroller

UIImagePickerController in Landscape

社会主义新天地 提交于 2019-11-26 17:28:58
I have been searching for an answer to this, but cannot come up with anything. Apparently, iPhone SDK 3.0 made it possible that UIImagePickerController can be displayed in landscape mode - but I am not finding any method that will allow this. I would think that if the application is in landscape by default it would automatically adjust the image controller, but that is not working for me. Thanks for any help! I haven't checked whether this is illegal, but it worked for me. If you want the UIImagePickerController to start(and stay) in Landscape orientation code: //Initialize picker

Detect permission of camera in iOS

女生的网名这么多〃 提交于 2019-11-26 17:13:57
I am developing a very simple video app. I use the official control: UIImagePickerController. Here is the problem. When presenting the UIImagePickerController for the first time, the iOS will ask for the permission. The user can click yes or no. If the user clicks no, the control is not dismissed. Instead, if the user keeps clicking the start button, the timers go on while the screen is always black, and the user can't stop the timers or go back. The only thing the user can do is to kill the app. The next time the UIImagePickerController is presented, it is still a black screen and the user

UIImagePickerController doesn't fill screen

牧云@^-^@ 提交于 2019-11-26 17:07:51
I'm adding a custom overlay to the UIImagePickerController and there is a persistant black bar at the bottom of the view. Here is my code to instantiate the controller. - (UIImagePickerController *)imagePicker { if (_imagePicker) { return _imagePicker; } _imagePicker = [[UIImagePickerController alloc] init]; _imagePicker.delegate = self; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { _imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; _imagePicker.showsCameraControls = NO; _imagePicker.wantsFullScreenLayout = YES; _imagePicker

Force UIImagePickerController to take photo in portrait orientation/dimensions iOS

混江龙づ霸主 提交于 2019-11-26 16:36:50
问题 The only allowed orientation in my app is landscape. I force this in the project properties under target > summery and only allow portrait in shouldAutorotateToInterfaceOrientation The problem is when I take a picture while holding the phone horizontally (landscape), the photo will be taken in landscape orientation, while the UI remains in portrait mode. This means in landscape mode I get a wide image of 3264 x 2448 instead of the tall image (2448 x 3264) I get in portrait mode. Next the user

UIImagePicker cameraOverlayView appears on Retake screen

半腔热情 提交于 2019-11-26 16:35:01
问题 I am struggling with a problem. I am capturing a video, and i had put an UIImageView with an UIImage in it as the UIImagePicker CameraOverLay. So when the user starts the camera in order to capture a video, he can see an overlay on the camera. When the user stops capturing, and is being moved to the "cancel or Retake" screen of the UIImagePicker, the cameraOverlayView is still visible. any ideas on how to not display the overlay in the "retake or cancel" screen? 回答1: Solved by signing up to

iPhone, “More than maximum 5 filtered album lists trying to register. This will fail.” Error

为君一笑 提交于 2019-11-26 16:21:10
问题 When I try to read an image from the photo library I get the error, "More than maximum 5 filtered album lists trying to register. This will fail." The image is not read. Any idea how to fix this? 回答1: I think you are not checking the source type. You might be doing self.sourceType =UIImagePickerControllerSourceTypePhotoLibrary; If this is the case, then you have to check the source type before assigning it directly. like if ([UIImagePickerController isSourceTypeAvailable:

How can i get the name of image picked through photo library in iphone?

社会主义新天地 提交于 2019-11-26 16:20:14
I am picking an image from photo library in iphone application. How will i retrieve the actual image name. in .h class UIImageView * imageView; UIButton * choosePhotoBtn; in .m class -(IBAction) getPhoto:(id) sender { UIImagePickerController * picker = [[UIImagePickerController alloc] init]; picker.delegate = self; if((UIButton *) sender == choosePhotoBtn) { picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; } else { picker.sourceType = UIImagePickerControllerSourceTypeCamera; } [self presentModalViewController:picker animated:YES]; } - (void)imagePickerController:

UIImagePickerController error: Snapshotting a view that has not been rendered results in an empty snapshot in iOS 7

不打扰是莪最后的温柔 提交于 2019-11-26 15:53:17
I am getting this error only in iOS 7 and the application crashed. In iOS 6, I never get any error, just once of memory warning when opening the camera. Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates. Here is what I am doing. imagePicker = [[UIImagePickerController alloc] init]; [imagePicker setDelegate:self]; [imagePicker setSourceType:UIImagePickerControllerSourceTypeCamera]; [imagePicker setAllowsEditing:YES]; [self presentModalViewController:imagePicker

iPhone SDK - How to disable the picture preview in UIImagePickerController?

拜拜、爱过 提交于 2019-11-26 15:49:23
问题 Is there any way to disable the image preview after taking a picture with the UIImagePickerController? I want to dismiss the ImagePicker as soon as the user pressed the shutter release button. 回答1: I asked a similar question here My solution was to create a customized view on top of the default UIImagePickerControllerView. I downloaded the example Augmented Reality Then you can use the OverlayView.m and OverlayView.h by adding them to your project: I made the custom picker toolbar, picker and

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

被刻印的时光 ゝ 提交于 2019-11-26 15:35:05
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 snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen