uiimagepickercontroller

How to make UI Image Picker Controller read a custom source type in iPhone

♀尐吖头ヾ 提交于 2019-12-04 13:24:06
问题 I have to create a photo gallery app in iPhone. It should function same as the Photos app which is shipped with iPhone. But it should show the images which I package with the app. UIImagePickerController reads only the following source types. UIImagePickerControllerSourceTypePhotoLibrary, UIImagePickerControllerSourceTypeCamera, UIImagePickerControllerSourceTypeSavedPhotosAlbum I was thinking of adding the images bundle to the resources group in Xcode and make UIImagePickerController to read

Get Camera Roll photos to a Custom Collection View

孤街醉人 提交于 2019-12-04 13:18:58
I have an Custom Collection View with Cells. Here is my CollectionView code. - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath; { Cell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"MY_CELL" forIndexPath:indexPath]; return cell; } I want to get images from Camera Roll & display in these cells. How can I get Camera Roll images to view in this Cell? Should I use an array to store names of the images & then show them in the Cell? Can anyone please give me a solution with a code. You can get the Albums and Photo/video assets using

UIImagePickerController appears but camera doesn't start on iOS 5

久未见 提交于 2019-12-04 13:07:25
I have an app where I present a UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera . Everything works fine unless I leave the app and come back (multitasking is enabled so the app comes back right where it left off) and I present the UIImagePickerController again. It appears on screen but the camera never shows, the animation where the camera is revealed never happens, here is a screenshot: If I press cancel and present the UIImagePickerController again, the camera will show up fine. So the only time this problem occurs is the first time I present the

UIImagePickerController's shutter

▼魔方 西西 提交于 2019-12-04 12:54:27
I have bug with UIImagePickerController which source type is camera. Sometimes after controller appeared, shutter is not opens up and I can't to see a camera video signal, but photo taken is correct. May be I doing something wrong? Code: if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]){ UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init]; cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera; cameraUI.allowsEditing = NO; cameraUI.showsCameraControls = NO; cameraUI.delegate = self; NSArray *nibObjects = [[NSBundle

ios5 “The operation could not be conpleted” when UIImagePickerController pick a 3gp file, and the whole UI freezed?

荒凉一梦 提交于 2019-12-04 12:40:46
Normal video file “choose” and "compressing videos", enter the imagePickerController:didFinishPickingMediaWithInof callback. But from "camera roll" pick one 3gp file, occur “The operation could not be completed”, and freezing, don't response to any input action. In the end, I am forced to close my app. This is due to selection of bad video. I got RID with the help of below code. -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated{ if ([NSStringFromClass(viewController.class)

Camera image rotation issue

只谈情不闲聊 提交于 2019-12-04 11:54:06
问题 I am facing a very strange problem here. When i click an image in portrait mode and upload it and then again fetch it it is displayed rotated 90 degrees counter clock wise. But when i see it in camera roll it is displayed in correct orientation as it was taken in. I have tried almost all possible links/codes for this issue but nothing seemed to help. I save images in JPEG representation.Please help with this someone. Thanks in advance!! 回答1: Resolved by making a category on UIImage and

UIImagePickerController (using camera as source) does autorotate on iPad2, how do i stop it?

筅森魡賤 提交于 2019-12-04 11:46:19
I am trying to write an app with some camera function, and I use an overlay view to decorate it with an image. This is how I implement the app: I use the UIImagePickerController to who the user what the camera takes in, and add a UIImageView onto the cameraOverlayView as a subview so that it works like this: (image at http://www.manna-soft.com/test/uploads/UIImagePickerView-portrait.jpg ) This works fine until the iPad2 come into place... it autorotates like this and ruin the layout: (image at http://www.manna-soft.com/test/uploads/UIImagePickerView-landscape.jpg ) The UIImagePickerController

iPhone Camera - Choose from Library or Take Photo

蹲街弑〆低调 提交于 2019-12-04 11:43:00
Please look at the image below !! So in this image... You can see a pop-up from the bottom which gives the user 3 options when he 'taps' the 'Camera' button. What is that view ? Is it a modal view controller which gets dismissed when an option is selected ? Edit: So it is UIActionSheet ! I have one more question on this, but StackOverflow would love it if I could edit the question rather than putting up a new one. So yes.. The option "Take Photo" uses the UIImagePickerController, and the "Cancel" button is the resignFirstResponder... What about "Choose From Library" ? How do I access the

ios7 CameraPickerController image from camera is frozen

孤者浪人 提交于 2019-12-04 10:08:11
I have this simple code for camera View controller: UIImagePickerController picker = new UIImagePickerController(); picker.PrefersStatusBarHidden (); picker.SourceType = UIImagePickerControllerSourceType.Camera; UIImagePickerControllerCameraDevice dev = picker.CameraDevice; PresentViewController (picker, false, null); picker.FinishedPickingMedia += (object sender, UIImagePickerMediaPickedEventArgs e) => BeginInvokeOnMainThread (delegate {DismissViewController (false, null);}); When app starts, I can capture photo normally, but when i present picker again, camera View appears but frame(image)

How can I tell if the image returned from didFinishPickingMediaWithInfo was from the camera or the photoalbum?

旧街凉风 提交于 2019-12-04 09:59:01
问题 I have a view controller that needs to be able to choose a picture from the photo album and also from the camera. I can only have 1 delegate method for didFinishPickingMediaWithInfo and while I can tell if it's an image, I can't seem to tell if it's from the album or from the camera (and I need to save it in the album first). Is there anything in the info that can help me distinguish from the two? Thanks... 回答1: Because the UIImagePickerController is passed to the method, all you have to do