Last active
August 29, 2015 13:57
-
-
Save jyliang/9519809 to your computer and use it in GitHub Desktop.
quick nsoperation
This file contains 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
@implementation CustomOperation | |
- (instancetype)init { | |
self = [super init]; | |
if (self) { | |
} | |
return self; | |
} | |
- (void)main { | |
@autoreleasepool { | |
if (self.isCancelled) { | |
return; | |
} | |
if (self.isCancelled) { | |
return; | |
} | |
[[NSOperationQueue mainQueue] addOperationWithBlock:^{ | |
}]; | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment