I’m creating an iOS app that works with photos.
I have built apps that do similar things on Android, and know of some of the pains that images can bring with regard to storage and memory management.
Here are my questions:
- How do I save a picture that I’ve taken & where do I save it to (is it sensible to save it with core data somehow?)?
- How do I load a picture from wherever I’ve saved it to?
- For a tableview with images, do I need some form of lazy loading (you do on Android), if so, can anybody recommend a tutorial or library?
Use the system imagepicker/taker
UIImagePickerControllerand no dont store images in CoreData. As a general rule store them in the system photo library. Store the Asset Library URL as a reference.Images can be stored in your App documents folder also.
Use the API in the
AssetsLibraryframework to retrieve pictures from the system store.No. Lazy loading is done for free by your
UITableViewControllerimplementation. There are a 1001 great UITableView tutorials on the web.