I have a ViewController
where I want a UITableView
to contain 5-30 user profiles (name, profile pic, about me etc) it is one of the tabs in a TabController
. The profile content change rarely, but once a week, some profiles are added/removed.
The profile content comes in the form of a json
object from our server that I parse into a [[String:Anyobject]]
array.
One of the fields contain the URL to the profile picture (only like 30kb each).
My question is: What is the best pattern for getting to the pictures and displaying them in the TV?
First, I am guessing it is preferable to do one single URL request, instead of 30 individual. How can I accomplish that? example URL to a profile image is:
www.example.com/assets/profileImages/useriD.png.
Second, should I save the pictures to CoreData first and then fetch them from there (if so how?) or should I just do a URL request inside the cell like I do to set the profile name etc ?
If anyone could point me in the right direction about the correct pattern for this that would be awesome, thank you !