I'm looking for a custom control I can put in a UIViewController that has the functionality of UIImagePicker (displaying thumbnails, enable multiselect etc.) but display images from "the server" (a given array of images)
All the ImagePickers I find work directly on the albums as an alternative to UIImagePicker
Does anyone know a nice solution?
You can use this lib called "JPImagePickerController"
https://github.com/jeena/JPImagePickerController
You will make your own DataSource which will take your images which could be provided from disk or bundle
Related
Hey just wondering if its possible to Select a specific image from the photolibrary and implement into a Collection View
so the idea is to have an image the user can select from the photolibrary then fill the selected image into a cell within the collection view i would also like to be able to save the image so if the user deletes the photo from the library it remains within the application ( was thinking i could save the image within firebase or NSUserdefaults?
A controller demonstrating how to select photos to display in a collection view can be found here.
If you're only going to be saving a single image, then putting it at a known path like demonstrated here would work: How to save a remote image with Swift?
If you're trying to manage multiple images, it's probably a good idea to look into Core Data and have it manage the images' UIImageJPEGRepresentation NSData for you. (Be sure to set "Store in External Record File" for the image data record if you do this!)
My app takes some videos and pictures and stores them in the Application Home/Documents folder. I want to create a gallery that will open and display (and playback) these items. I looked into MPMediaPickerController and it looks like the only option for data source there is the Photos Album.
It looks like I will have to go with creating UICollectionView. Is this the right way to do this or is there another way similar to MPMediaPickerController but with setting the source to an array of data objects?
The best way to do it is use your own implementation UICollectionView. MPMediaPickerController mainly works for media related(especially for songs and videos)
Since you have images and videos just use NSFilemanager to get the files in Documents Directory and pass the information to UICollectionView datasource and handle the touch actions on the UICollectionView didSelect methods.
In my app which i am developing now has the Image Gallery where it consist of lot of albums and multiple images per album.
which is the best practice to use for Image Gallery? where i am planning to create a tableview for album listing and a navigating to a new View Controller taping on album. is that good way of creating albums?
and i'm using AFNetwork how to cache the images in the background so that the performance of the application will not effect.
Thanks in Advance.
There are lot if third party image gallery libraries available for iOS. Following are few of them :
FGallery-iPhone
UIPhotoGallery
MWPhotoBrowser
Image-Gallery
If above ones doesn't serve your purpose you can always create a custom gallery view that serves your purpose.
I know it is possible to show ALL photo albums by setting the source of a uiimagepickerviewcontroller to UIImagePickerControllerSourceTypePhotoLibrary. However, is it possible to then navigate to a specific album if it exists?
No this cannot be.
Unfortunately,The UIImagePickerController is a private, system class, which doesn't really allow alteration.
You can not do this using UIImagePickerController but you can iterate through the gallery album.
Here is an example CustomPhotoAlbumDemo.
I'd like to create a custom image browser in my app that uses the images from the camera roll.
i.e. I'd like to completely replace UIImagePickerController and use my own control.
Is there a way of accessing the camera roll photos in this way?
Cluster App does this but I can't find a picture of it.
You need to use ALAssetsLibrary to access the images.
Have a look at the QBImagePickerController on the GitHub. They implemented custom image picker controller very similar to UIImagePickerController with added multiple selection feature. It will help you. Atleast look at this file
Check out RengarViewController
a custom image picker controller which make use of Photo Framework (introduced in iOS 8).
It has nice UI, can be scrolled and panned.