Added two methods for UIImageView+AFNetworking #880

Closed
wants to merge 2 commits into
from

Projects

None yet

3 participants

  • (void)setImageWithURLOrString:(id)object;
  • (void)setImageWithURLOrString:(id)object
    placeholderImage:(UIImage *)placeholderImage;
Lascorbe added some commits Mar 27, 2013
@Lascorbe Lascorbe Adding two methods
- (void)setImageWithURLOrString:(id)object;
- (void)setImageWithURLOrString:(id)object
                placeholderImage:(UIImage *)placeholderImage;
a909b0e
@Lascorbe Lascorbe Added two methods
- (void)setImageWithURLOrString:(id)object;
- (void)setImageWithURLOrString:(id)object
                placeholderImage:(UIImage *)placeholderImage;
7ab0fe6
Contributor
mattt commented Mar 29, 2013

Thanks for the pull request, but I don't really see the value in these methods. Increasing the surface area in order to the API just to save a call to NSURL +URLWithString: seems redundant.

@mattt mattt closed this Mar 29, 2013
Contributor

If I were going to go down this road I'd probably just change the signature of setImageWithURL: to accept an id and do type checks on the value passed rather than adding new methods. Plus a good rule of thumb for API design is never compress something down to one line that can already be done in…. one line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment