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
- (id)initWithEntityName:(NSString *)aName | |
predicate:(NSPredicate *)aPredicate | |
sortDescriptors:(NSArray *)sortDescriptors | |
managedObjectContext:(NSManagedObjectContext *)aMOC |
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
FRCoreDataExportOperation *op = [[FRCoreDataExportOperation alloc] initWithEntityName:@"Destination" managedObjectContext:<MAIN CONTEXT>]; | |
//[Optional] Set the name of the output file | |
[op setFileName:@"output.txt"]; | |
//Set the entity formatter | |
[op setEntityFormatter:[[FRCSVEntityFormatter alloc] init]]; | |
[<YOUR OPERATION QUEUE> addOperation:op]; |
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
// | |
// FMDatabaseQueue+async.h | |
// | |
// Created by Jonathan Dalrymple on 05/02/2013. | |
// | |
#import <FMDB/FMDatabaseQueue.h> | |
#import <objc/runtime.h> | |
const static char *propertyName = "FR_asyncQueueProperty"; |
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
#import <UIKit/UIKit.h> | |
#import <QuartzCore/QuartzCore.h> | |
typedef void(^UIImageRenderBlock)(CGContextRef context); | |
@interface UIImage (render) | |
+(UIImage *)imageWithSize:(CGSize) canvasSize block:(UIImageRenderBlock) aBlock; | |
@end |
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
//Public interface | |
@interface foo:NSObject | |
@property (nonatomic,readonly) NSObject *bar; | |
@end | |
//Implementation | |
@implementation foo |
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
//Public interface | |
@interface foo:NSObject | |
@property (nonatomic,readonly) NSObject *bar; | |
@end | |
//Class Extension | |
@interface foo() |
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
//Public interface | |
@interface foo:NSObject | |
@property (nonatomic,readonly) NSObject *bar; | |
@end | |
//Class Extension | |
@interface foo(){ | |
NSObject *_foo; |
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
//Public interface | |
@interface foo:NSObject | |
@property (nonatomic,readonly) NSObject *bar; | |
@end | |
//Class Extension | |
@interface foo(){ | |
NSObject *_foo; |
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
//Public Interface | |
@interface foo:NSObject{ | |
NSObject *_bar; | |
} | |
@property (nonatomic,readonly) NSObject *bar; | |
@end | |
//Implementation |
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
//We use the fantastic AF Networking | |
operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:[request preparedURLRequest]] | |
success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON){ | |
//The JSON variable will contain the currently logged users information! | |
} | |
failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) { | |
//Handle any request errors | |
}]; | |
//Ideally we would add this operation to a global operation queue |