Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Set URL from URL request so caching works

  • Loading branch information...
commit 4a67129833dd247dea4f674deec7e86043318746 1 parent 10783e1
@thillerson thillerson authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 Core/Source/DTLazyImageView.m
View
7 Core/Source/DTLazyImageView.m
@@ -72,7 +72,7 @@ - (void)didMoveToSuperview
{
[super didMoveToSuperview];
- if (!self.image && _url && !_connection && self.superview)
+ if (!self.image && (_url || _urlRequest) && !_connection && self.superview)
{
UIImage *image = [_imageCache objectForKey:_url];
@@ -284,4 +284,9 @@ - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)err
@synthesize shouldShowProgressiveDownload;
@synthesize urlRequest = _urlRequest;
+- (void) setUrlRequest:(NSMutableURLRequest *)request {
+ _urlRequest = request;
+ self.url = [_urlRequest URL];
+}
+
@end
Please sign in to comment.
Something went wrong with that request. Please try again.