uiimagepickercontroller

Swift 3.0 - how to hide status bar after calling UIImagePickerController?

霸气de小男生 提交于 2019-12-18 08:54:05
问题 Happy New Year! I want to hide status bar after calling UIImagePickerController on iOS 10.2. You know there are already several questions about it with some answers, but I'm afraid the answers don't work for Swift 3.0. The suggested answers are: extend UINavigationController to override preferStatusBarHidden, because UIImagePickerController is a subclass of UINavigationController. So I tried: extension UINavigationController{ open override var prefersStatusBarHidden: Bool{ return true } }

How do I pick and record video using UIImagePickerController for iPhone?

纵然是瞬间 提交于 2019-12-18 05:22:07
问题 I want to pick a video from iPhone for my application for uploading on the Web. I am using the UIImagePickerController for it. For for opening picker UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; imagePicker.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *)kUTTypeMovie, nil]; [self presentModalViewController:imagePicker animated:YES]; It opens the

iOS UIImagePickerController, set frame

我们两清 提交于 2019-12-18 05:14:13
问题 I'm trying to accomplish the following result: Set the frame of my UIImagePickerController to, lets say 200 x 200, Set my frame at the bottom-right corner (just like Facetime/Skype does) and show the front/rear (doesn't matter) camera stream. Here's my code, for some reason, setFrame is not working! self.picker = [[UIImagePickerController alloc] init]; self.picker.sourceType = UIImagePickerControllerSourceTypeCamera; self.picker.cameraCaptureMode =

iphone imagepickerController picking video from photo library

て烟熏妆下的殇ゞ 提交于 2019-12-18 05:12:32
问题 I am now trying to implement a app like picking image and video from device photo album and uploading it to server.. here i can able to display both image and video in a table view using uiimagepickercontoller but i can only able to pick image not video.. How to pick a video form photo lib using UIimagepickercontroller.... UIImagePickerController *ipc = [[UIImagePickerController alloc] init]; ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; ipc.mediaTypes =

UIImagePickerController Image Orientation

随声附和 提交于 2019-12-18 04:23:39
问题 Can anyone tell me how to use the UIImagePickerController (camera and album) delegates determine the image's orientation, rotate accordingly, and assign it to a UIImageView? 回答1: No, UIImagePickerController cannot do it explicitly. If you want to determine based on image's content. It is kind of hard problem. How can you determine an image's orientation without understanding the content inside of it? I can suggest you a trick that you examine the width and the length of the returned image and

How to upload image that was taken from UIImagePickerController

社会主义新天地 提交于 2019-12-18 04:19:10
问题 After user choose image from the iPhone library with UIImagePickerController , I want to upload it to my server using ASIHTTPRequest library. I know that with ASIHTTPRequest I can upload a file with the file's URl, but how do I get the image URL? I know I can get the image UIImagePickerControllerReferenceURL , that look like this: "assets-library://asset/asset.JPG?id=F2829B2E-6C6B-4569-932E-7DB03FBF7763&ext=JPG" is this the URL I need to use? 回答1: There are two ways 1: You can upload the

UIImagePickerController tutorial? [closed]

心已入冬 提交于 2019-12-18 02:51:27
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am currently developing an application and I need to be able when pressing a button to open the camera and take a snapshot that I will attach to a .json file and send to my server. I am searching on google and StackOverflow for the last couple of hours but all the tutorials seem very old (08'-09') or not match

How to get image file size in Swift?

ⅰ亾dé卋堺 提交于 2019-12-17 22:34:03
问题 I am using UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIPopoverControllerDelegate these delegates for choosing image from my gallery or my camera. So, how can I get image file size after choosing an image? I want to use this: let filePath = "your path here" var fileSize : UInt64 = 0 do { let attr : NSDictionary? = try NSFileManager.defaultManager().attributesOfItemAtPath(filePath) if let _attr = attr { fileSize = _attr.fileSize(); print(fileSize) } } catch { } but here I

Select videos using UIImagePickerController in 2G/3G

旧时模样 提交于 2019-12-17 19:52:22
问题 I am facing a problem where-in I cannot select videos from the photo album in iPhone 2G/3G device. The default photos application does show videos and is capable of playing them, which in turn means that UIImagePickerController should clearly be capable of showing videos in photo album and selecting them. I have coded this to determine whether the device is capable of snapping a photo, recording video, selecting photos and selecting videos: // Check if camera and video recording are available

recored video using UIImagePickerController

二次信任 提交于 2019-12-17 19:25:18
问题 I'm developing an iPhone app that records video. I create a UIImagePickerController , limit it to video recording then programatically ask the camera to startVideoCapture. Unfortunatly when I run the app I get the following in the console; "UIImagePickerController: ignoring request to start video capture; camera is not yet ready." how can i handle this? 回答1: The most probable reason seems to be the absence of the required key in your info.plist file. You will need to configure