Skip to content

Commit

Permalink
ADD: call to cancel any outstanding image requests before starting a …
Browse files Browse the repository at this point in the history
…new one
  • Loading branch information
u10int committed Mar 11, 2014
1 parent c84f77d commit 8ef8639
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions URBMediaFocusViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ - (void)showImageFromURL:(NSURL *)url fromView:(UIView *)fromView inViewControll
- (void)showImageFromURL:(NSURL *)url fromRect:(CGRect)fromRect {
self.fromRect = fromRect;

// cancel any outstanding requests if we have one
[self cancelURLConnectionIfAny];

NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
self.urlConnection = connection;
Expand Down

0 comments on commit 8ef8639

Please sign in to comment.