I haven’t found any documentation on this or seen this done before, but is there anyway I can, instead of just choosing one image with UIImagePicker, load the user’s albums, and then after selecting an image, that image displays, but also allows me to scroll left and ride to see all the images before and after that image?
I know I can use a multiple image picker, but that involves importing all the user’s photos, and if the user has hundreds of photos, this would take a lot of time. I’m looking for similar functionality to the real photos app- the performance and everything. Any ideas?
Yes, you can. Look at the documentation for
ALAssetsLibrary. This will allow you to enumerate all the user’s image (and video) libraries. From this, you getALAssets, which you can ask for their defaultALAssetRepresentation. This one, in turn, you ask for itsCGImage, from which you can create aUIImage.Enumerating Libraries and Assets is done in blocks, which can easily be done in the background.