0

In my app I am trying to select the only image and PDF file from the gallery or file manager.

But when I am getting all the images and files which is stored in the file manager and gallery.

Here is my code:

if ([[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:@"Gallery"]) { 
    UIImagePickerController *pickerView = [[UIImagePickerController alloc] init]; 
    pickerView.allowsEditing = YES; pickerView.delegate = self; 
    [pickerView setSourceType:UIImagePickerControllerSourceTypeSavedPhotosAl‌​bum]; 
    [self presentViewController:pickerView animated:YES completion:nil]; 
} 
vaibhav
  • 4,038
  • 1
  • 21
  • 51
Purushothaman
  • 358
  • 4
  • 22
  • show ur tried code – Anbu.Karthik Oct 12 '16 at 11:07
  • if ([[actionSheet buttonTitleAtIndex:buttonIndex] isEqualToString:@"Gallery"]) { UIImagePickerController *pickerView = [[UIImagePickerController alloc] init]; pickerView.allowsEditing = YES; pickerView.delegate = self; [pickerView setSourceType:UIImagePickerControllerSourceTypeSavedPhotosAlbum]; [self presentViewController:pickerView animated:YES completion:nil]; } – Purushothaman Oct 12 '16 at 11:27
  • can you elobrate I am getting all the images and files which is stored in the file manager and gallery....? – Anbu.Karthik Oct 12 '16 at 11:30
  • i want only the images and pdf files from the gallery or file manager – Purushothaman Oct 12 '16 at 11:31
  • check my answer – Anbu.Karthik Oct 12 '16 at 11:33
  • ok i have added the code Karthick, But Now the issue is https://github.com/rao471/select-image-and-pdf-file/projects when i upload the image it is taking for 1st session only , can u solve @Anbu.Karthik – Purushothaman Oct 12 '16 at 11:45
  • then your question is not clear, where u struck , I m not understand excatly what u need – Anbu.Karthik Oct 12 '16 at 11:46
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/125500/discussion-between-purushothaman-and-anbu-karthik). – Purushothaman Oct 12 '16 at 11:49

0 Answers0