AFNetworking/AFNetworking — pull request #1768 by alexito4 (2014-01-22 16:53:56+00:00)
Title: Set the image placeholder only if isn't nil

I was using one UIImageView to show a background image in a controller. When the user change the page in a UIScrollView I change the background image view. I was using the method: -setImageWithURLRequest:placeholderImage:success:failure: passing nil in the placeholderImage parameter, because I just want to change the 'old' image with the 'new' one. This behavior is typically seen in tours the first time the app is executed.

The problem is that this method change the image to nil and for a moment (unitl the new image is downloaded and set) the user can see behind the UIImageView (ex: the white color of the controller).
I solve this problem passing the imageview.image to the placeholder, but I think that this can be done easily inside the method, just checking if the placeholder image is nil.

What I don't know if the behaviour of setting always the placeholder without checking is on purpose, but well, here it is the PR ^^