Swift: Loading Images Asynchronously and storing with NSCache and NSURLCache

Опубликовано: 26 Февраль 2016
на канале: Lets Build That App
40,356
667

Tutorial on creating the Facebook news feed UI:
Part 1:
   • Swift: How to create Facebook News Fe...  


This tutorial is quick discussion on the proper way to cache UIImage objects after fetching it over the network. We go over the more naive approach of implementing a String to UIImage dictionary. Then we get a bit more clever and use an NSCache object. Finally, we utilize NSURLSession's default cache mechanism by setting up our own cache with NSURLCache.

Completed Project:
https://www.letsbuildthatapp.com/cour...

Network Link Conditioner:
https://developer.apple.com/downloads...