Hacker News new | ask | show | jobs
by andwang 5084 days ago
Just glanced through SDWebImage's source code. Think this is quite similar to AFNetworking's UIImageView category. My comment below should also apply here.

In the Parse framework, the equivalent class is PFImageView. We chose to design our API differently; from my experience, I believe the assignment of the web image to load and the actual download of the images should be two different steps. This is evident in UITableViewController. In tableView:objectForRowAtIndexPath:, the app developer should know which URL to load, but we should not load the images at this point. Although you CAN achieve the same goal via the other two libraries' API, I feel strongly the API becomes more intuitive to use when the two steps are broken apart.

1 comments

By the looks of it, Parse is still downloading the image as the table view scrolls (that would be only reasonable). The behavior of not displaying until the table stops moving would appear to be a shortcoming of Parse not executing its operation using NSRunLoopCommonModes. AFNetworking gets this right.
Hi Mattt, in PFQueryTableViewController, the downloading does not start until the scrolling stops. We chose to do this because we wanted the default loading behavior to be very passive. You could verify this is indeed the behavior from the animated gif - the network activity does not start until the table finished scrolling.