Created
September 13, 2009 18:58
-
-
Save ddribin/186285 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)start; | |
{ | |
if (![NSThread isMainThread]) | |
{ | |
[self performSelectorOnMainThread:@selector(start) withObject:nil waitUntilDone:NO]; | |
return; | |
} | |
NSLog(@"opeartion for <%@> started.", _url); | |
[self willChangeValueForKey:@"isExecuting"]; | |
_isExecuting = YES; | |
[self didChangeValueForKey:@"isExecuting"]; | |
NSURLRequest * request = [NSURLRequest requestWithURL:_url]; | |
_connection = [[NSURLConnection alloc] initWithRequest:request | |
delegate:self]; | |
if (_connection == nil) | |
[self finish]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment