iOS How to create a custom image picker/browser - ios

I have been looking around and haven't found a good answer for this.
Instagram uses an image browser/picker like . As you can see above the images from the photo gallery are displayed in a grid below and you can directly choose image from there instead of using the default image picker layout.
The Groupme app also does something similar..
Where images are displayed in a horizontal scrollable list and you can just choose from this.
I have been reading up on the image picker and the documentation says that subclassing is not support.
So my question is:
How do you create something like this?
If this is just a custom view that loads the images stored on the device. How do I access those images?
I just need a starting point and what to specifically look for (custom browser/image picker etc).
Thanks in advance.

You use the ALAssetsLibrary APIs, docs here.

Related

Creating Custom Image Picker Controls- applying cropping

I am designing a custom image picker, for that I am using view controllers, I have successfully used camera to take picture and proceed it to PreviewControllerVC, now I want to apply cropping on that screen.
any suggest.
I found the answer myself, HIPImageCropperView is the library i used for it.
It's best for this purpose.

iOS8 - Crop and Straighten image as built in photos tool

In my app, i want users to click a photo, then i want to allow them to edit it for crop/rotate/straighten. Can i use built-in photos app for that? or is there any open-source/api to have similar view controller.
I know it's a possible duplicate of Is there a view controller for image crop and rotate works like iOS 8 photo.app? but i found no answer here as well.Please let me know if it's possible?
Unfortunately, no.
UIImagePickerViewController allowEditing property, when set to YES, provides you a very simple cropping UI, but it doesn't support advanced rotation as iOS Photo app.
So you'll have to make it yourself.
The github projects in the question you linked might be a good starting point for that. (here's another one)
Good luck !
I wrote one in Swift, you can continue to develop based on this: QCropper

Creating my own Image Picker

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.

iOS iTunes Album Cover type (or similar) Image Display

Is there any tutorials that show how to make a Image display similar to the Album Art diaply in iTunes? Or anything similar. I followed code posted here, but I just cannot seem to get it working in the new XCode. Opening his project works fine, but using it in my own, the UIImageView renders the images beyond it's borders, making them appear over each other.
Any help would be appreciated.
I assume you're talking about CoverFlow?
I wrote a free, very easy to use CoverFlow library. It's modelled on the way that UITableView works, so if you can use that, you can use this. You can get it from here:
https://github.com/nicklockwood/iCarousel

Using UIImagePicker in a tabbed UIPopover

I am developing an iPad app that needs to have multiple image sources, on the device/Photo Albums, remote and some included with the app. Now the ideal situation would be to have a UIPopover controller with 3 tabs for each source. The only problem is I can't seem to figure out how to have a UIImagePicker be in its own tab. What I am trying to do is very similar to Apple's Keynote for iPad. The photo icon's popover has tabs and the far left tab called media for sure has a UIImagePicker in there. I have no idea how they did that, is it possible for me to do something like that? I think the main issue is that the Image Picker is it's own navigation controller and it cannot be pushed on to another navigation controller. Any help would be greatly appreciated!
check out this - https://github.com/key1jp/ELCImagePickerController
you can implement it with custom asset library
The built-in image picker is no good.
Create your own image picker and add it to your navigation controller as a normal view. Start from either the Matt Tuzzolo or the MyImagePicker from the WWDC 2010 sample code. Note that you probably want to add image and video preview - I copied the image viewer from MyImagePicker and added a 'add' or 'remove' button to it, and the same for video.
Your image picking is in two steps, one for selecting the group, and one for selecting the assets within the group. I recommend dividing the first step into a two - if there is only one, then go directly to that group, i.e. when you have found the first group, check whether that group was the last (block stop argument). Then push the right view controller.
Obiously modify the size of the thumbnails also, they are iPhone size now. Adding a line of metadata (icon and duration) looks much nicer and is more informative for video.
I also recommend adding a 'click-and-hold' function for extended information after like 2 seconds.
Handle different sources by creating a protocol which gives you what you want, i.e.
-(BOOL)isImageAtIndex:(NSInteger)index;
-(UIImage*)thumbnailForUndex:(NSInteger)index;
-(void)setSelectedAtIndex:(NSInteger)index;
Creating a source which handles local files, included resources and assets is perfectly possible - I use NSURLs and check on the url scheme.
Are you not using UITabBarController for your tabs? You should be able to add a UIImagePickerController directly to viewControllers. I'm not sure whether that is a supported use of the image picker, though; the documentation only mentions displaying it modally or displaying it in a UIPopoverController.
It's not usually useful to look at an Apple app to find out what you can do with various built-in controls, as Apple allows themselves to use private APIs.

Resources