Skip to content

Instantly share code, notes, and snippets.

@jyliang
Last active August 29, 2015 13:57
Show Gist options
  • Save jyliang/9519809 to your computer and use it in GitHub Desktop.
Save jyliang/9519809 to your computer and use it in GitHub Desktop.
quick nsoperation
@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