Open mike-north opened 10 years ago
You set hidden in a background thread, remember that UI calls can only be done in the main thread. The easier way to do this is to use the same AFNetworking UIImageView category that we've used before and just set the url to nil before you set it to a new one. Using your current implementation, you can do something similar by setting imageView.image = nil instead of toggling the hidden property.
Good job! The primary purpose of this homework was to get a basic familiarity with UICollectionView. Here is the checklist that I used while reviewing your homework.
@nesquena and @timothy1ee -- here's my image search app.
I'm noticing that the paging works as the user scrolls, the images are loaded in to the collection view as expected, but due to the
dequeueReusableCellWithReuseIdentifier
stuff, when a collection view cell is re-used, the image it previously was being used for remains in the cell's NSImageView until the new image is finished loading.I tried some setHidden tricks, but I can't seem to ensure that the NSImageView is ready before making it visible.