I have UIimagePicker that get the image from the gallery ,
but I noticed that when the app open the gallery,
the gallery open and start showing the images from the top of the gallery which is the oldest images in the iphone.
My question is how to scroll the gallery to the bottom to show the newest images first as I saw in the Facebook app when uploading image from the gallery .
I used the following code to do that and it works for me :
UIImagePickerController *picker;
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
Related
I need to customize the square frame that comes after when we select a image from the camera using uiimagepickerController
UIImagePickerController comes with a handy method to enable editing.
UIImagePickerController *mediaUI = [[UIImagePickerController alloc] init];
[mediaUI setAllowsEditing:YES];
calling this method should help.
i am working with an iOS application in which i want to select multiple images using UIImagepickercontroller and then upload it on DropBox.
i found in some places that by using UIImagepickercontroller we only select single image at once a time . i am using the below code for selecting multiple images using UIImagepickercontroller with the help of UIPopovercontroller :
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.mediaTypes = [NSArray arrayWithObject:(NSString*) kUTTypeImage];
// [self presentViewController: imagePicker animated:YES completion:NULL];
popoverController = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
[popoverController presentPopoverFromRect:CGRectMake(0.0, 0.0, 400.0, 300.0)inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
but when i run this application i only get a popup window and just select single image.
Is there any way by which i can select multiple images?
Please help me out.
Thanks in advance
There are so many third party classes which enables us to pick multiple images from asset library and all are listed here.
I suggest you to use ELCImagePickerController.
You may choose your option here.
I had drag and drop a photo inside the IOS simulator and then saved it inside Safari. This photo got saved in /Users/myuser/Library/Application Support/iPhone Simulator/7.1-64/Media/DCIM/100APPLE/IMG_0001.JPG.
When I run the app using UIImagePickerController I cannot see any photos, just the message: No Photos or Videos. You can sync photos and videos onto your iPhone using iTunes.
Is there anything different I have to do to access that photo ?
When in the simulator, go to safari, then search an image.
Long press that image and a popup will show. Choose Save Image. Now the image is saved in your saved photos album.
When in the app, open the ImagePicker like this :
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = NO;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.mediaTypes = [[NSArray alloc] initWithObjects:(NSString *) kUTTypeImage, nil];
[self presentViewController:picker animated:YES completion:NULL];
Be sure to include <MobileCoreServices/MobileCoreServices.h> for the mediaType (if you want photos only, without videos).
(if it's an iPad app it will be a little different, you will need to use UIPopoverController).
You should be able to see that image you saved.
Good Luck.
I´m creating an app that access to the Camera roll using ImagePickerController. The app has a buttom and when I tap on it the app should go to the last image saved on the roll. Using that code:
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:picker animated: YES];
the app open the thumbnails and I would like to open a specific image (full screen)
Is possible?
Image will open in full view only if you want to make edit to it.
Add this line to open in full view before presenting .
[picker setAllowsEditing:YES];
If you wish more function than you have two option.
Use your own custom control.
Add overlay view on UIImagePickerController
Refer this example to create your controls:
DLCImagePickerController
AGImagePickerController
I am developing an app which uses UIImagePicker to capture and save screen.
Following is the code to launch camera.
UIImagePickerController *imgPickController = [[UIImagePickerController alloc] init];
imgPickController.sourceType = UIImagePickerControllerSourceTypeCamera;
imgPickController.delegate =self;
imgPickController.allowsEditing=YES;
[self presentModalViewController:imgPickController animated:YES];
This launches the camera in the whole screen.
Is there any way to just show the camera-view inside another small subview on the app-screen?? Hope I am clear. Thanks.