Skip to content

Instantly share code, notes, and snippets.

View couchdeveloper's full-sized avatar

Andreas Grosam couchdeveloper

View GitHub Profile
@couchdeveloper
couchdeveloper / SimpleGetHTTPRequest.h
Last active December 18, 2015 09:58
SimpleGetHTTPRequest This is a simple Objective-C class which wraps a `NSURLConnection` and relevant state information. It's meant to give an idea how one can implement a more "real" and more versatile connection class. It's deliberately kept simple.
//
// SimpleGetHTTPRequest.h
//
#import <Foundation/Foundation.h>
typedef void (^completionHandler_t) (id result);
@couchdeveloper
couchdeveloper / NSOperationQueue
Created May 10, 2013 18:23
Play around with NSOperationQueue and NSOperation.
#import <Foundation/Foundation.h>
#include <dispatch/dispatch.h>
@interface Operation : NSOperation
@property (nonatomic, readwrite) BOOL isExecuting;
@property (nonatomic, readwrite) BOOL isFinished;
@property (nonatomic, readwrite) BOOL terminating;
@end
@implementation Operation {