Skip to content

Instantly share code, notes, and snippets.

View vl4dimir's full-sized avatar

Vladimir Mitrović vl4dimir

View GitHub Profile
#import <CoreData/CoreData.h>
@interface Photo : NSManagedObject {
}
@property (nonatomic, retain) NSString * imagePath;
@property (nonatomic, retain) NSString * thumbnailPath;
@property (nonatomic, retain) UIImage* image;
@property (nonatomic, retain, readonly) UIImage* thumbnail;
#import "UIImage+Resizing.h"
@implementation UIImage (Resizing)
/**
* Creates a resized, autoreleased copy of the image, with the given dimensions.
* @return an autoreleased, resized copy of the image
*/
- (UIImage*) resizedImageWithSize:(CGSize)size
{
@interface UIImage (Resizing)
- (UIImage*) resizedImageWithSize:(CGSize)size;
@end
@interface ExtendedManagedObject : NSManagedObject {
BOOL traversed;
}
@property (nonatomic, assign) BOOL traversed;
- (NSDictionary*) toDictionary;
- (void) populateFromDictionary:(NSDictionary*)dict;
+ (ExtendedManagedObject*) createManagedObjectFromDictionary:(NSDictionary*)dict
inContext:(NSManagedObjectContext*)context;