uiimagepickercontroller

iPhone - Remove status bar programmatically

让人想犯罪 __ 提交于 2019-12-03 19:56:37
问题 I have made an app that implements the iPhone's camera. When the user finishes picking their image, the status bar reappears! How would I make sure that the status bar stays hidden? Here is my code: -(IBAction)pickImage:(id)sender { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; [self presentModalViewController:picker animated:YES]; } - (void)imagePickerController:

UIImagePickerController record video with landscape orientation

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 17:31:06
问题 How can we force UIImagePickerController controller to record video only in landscape mode? I know that this class should be used for portrait recording, but I need to have it in landscape. Have found several similar questions but there is not any solution which works for me (iOS 6.1). For example observation of device orientation doesn't work for me (this answer- https://stackoverflow.com/a/2147584/775779) If I implement UIImagePickerController category like the following: #import

Replicate camera app rotation to landscape IOS 6 iPhone

眉间皱痕 提交于 2019-12-03 13:49:08
Hi I am trying to replicate the same rotation which can be seen in the camera app when orientation is shifted to landscape. Unfortunately I've had no luck. I need to set this up for the custom cameraOverlayView with UIImagePickerController. From this portrait (B are UIButtons) |-----------| | | | | | | | | | | | | | B B B | |-----------| To this landscape |----------------| | B | | | | B | | | | B | |----------------| In other words I would like the buttons to stick to the original portrait bottom and rotate on their centres. I am using Storyboards and Autolayout is enabled. Any help is

Customized photo picker view [closed]

北战南征 提交于 2019-12-03 13:48:47
I want to use photo picker view in customized form, such as showing a rectangle in screen to focus on specified area of the picture. However, UIImagePickerController can only offer a normal photo picker view. Is there any other class I can use to replace UIImagePickerController, or should I create a sub class of UIImagePickerController? You can use ALAsset Library for designing your own ImagePicker. With the help of ALAsset library you can able to extract the photos and videos from the iOS album and use it in your own design. A good example to start with this is ELCImagePickerController 来源:

Getting image from UIImagePickerController

岁酱吖の 提交于 2019-12-03 13:10:15
I want to get the image frm imagepickercontroller .But my code doesn't have any effect Here is the code.. - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker dismissModalViewControllerAnimated:YES]; imageview.image = [UIImage imageNamed:[info objectForKey:@"UIImagePickerControllerOriginalImage"]]; You can try this code to access an Image returned from the picker - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [picker dismissModalViewControllerAnimated

cameraOverlayView prevents editing with allowsEditing

时间秒杀一切 提交于 2019-12-03 13:03:09
Editing a photo after it's been taken (moving and scaling it) works fine in my app with this line: [imagePicker setAllowsEditing:YES]; But if I also use a cameraOverlayView, the editing mode doesn't work anymore. The screen comes up, but pan and pinch gestures don't make anything happen. I'm using your average image picker controller: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; And I add a camera overlay view, created from a custom view controller's view: CameraOverlayViewController *overlayController = [[CameraOverlayViewController alloc] init]; UIView

Convert nsdictionary to nsdata

若如初见. 提交于 2019-12-03 12:03:50
问题 have an app that can take a picture and then upload to a server. encoding it to base 64 and pass it thru a XMLRPC to my php server. i want to take the NSDictionary info that is returned from UIImagePickerController delegate -(void) imagePickerController:(UIImagePickerController *)imagePicker didFinishPickingMediaWithInfo:(NSDictionary *)info and convert it to NSData so i can encode it. so, how can i convert NSDictionary to an NSData? 回答1: You can use an NSKeyedArchiver to serialize your

UIImagePickerController stuck on compressing video on iOS10 simulator after choosing a video

血红的双手。 提交于 2019-12-03 11:56:21
I had this app that always worked normally on iOS9, now I've migrated the swift code to 3.0 and added the required plist rows to get access to photos library. While trying to pick a video (preloaded by dragging) from the camera roll using UIImagePickerController on simulator it always get stuck on "Compressing Video" and doesn't callback the delegate methods. @IBAction func videoFromLibrary(_ sender: UIBarButtonItem) { picker.allowsEditing = false picker.sourceType = .photoLibrary picker.mediaTypes = UIImagePickerController.availableMediaTypes(for: .photoLibrary)! picker.modalPresentationStyle

UIImagePickerController - crops picture to square (in portrait)

て烟熏妆下的殇ゞ 提交于 2019-12-03 11:30:42
问题 I'm using the UIImagePickerController to take and edit a picture. it works fine in landscape, but in portrait it will crop the picture into a square (does not allow to reduce the image to fit fully into the square crop field like in landscape. Any ideas? code: -(IBAction)initCamera:(id)sender{ //Init imagePicker instance UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; [imagePicker setDelegate:self]; [imagePicker setSourceType

save image in camera roll and get asset url

烂漫一生 提交于 2019-12-03 11:18:14
for an app I'm developing, I use UIImagePickerController to shoot a picture and store it in camera roll: - (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info { //... some stuff ... UIImageWriteToSavedPhotosAlbum([info objectForKey:@"UIImagePickerControllerOriginalImage"], nil, nil, nil); } the image is saved, now I need to get its reference url so I try to enumerate camera roll and get the last image, but I always get the image before the one I just shot. Anybody has an idea how to get the reference of the just saved picture? Thanks,