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
// | |
// NSDate+Formats.h | |
// Rego | |
// | |
// Created by Justin Driscoll on 12/7/12. | |
// Copyright (c) 2012 Makalu Inc. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
// | |
// NSManagedObject+JSON.h | |
// Rego | |
// | |
// Created by Justin Driscoll on 7/29/13. | |
// Copyright (c) 2013 Makalu Inc. All rights reserved. | |
// | |
#import <CoreData/CoreData.h> |
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
// | |
// JCDActionSheetDelegate.h | |
// Created by Justin Driscoll on 4/3/13. | |
// | |
#import <UIKit/UIKit.h> | |
typedef void (^JCDActionSheetDelegateCallback)(UIActionSheet *actionSheet, NSInteger buttonIndex); | |
@interface JCDActionSheetDelegate : NSObject <UIActionSheetDelegate> |
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
CGImageRef rawImageRef = [image CGImage]; | |
CFDataRef imageDataRef = CGDataProviderCopyData(CGImageGetDataProvider(rawImageRef)); | |
const UInt8 *rawPixelData = CFDataGetBytePtr(imageDataRef); | |
NSUInteger imageHeight = CGImageGetHeight(rawImageRef); | |
NSUInteger imageWidth = CGImageGetWidth(rawImageRef); | |
int brightness = 0; | |
int red = 0; |
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
// | |
// JCDActionSheetDelegate.h | |
// Created by Justin Driscoll on 4/3/13. | |
// | |
#import <UIKit/UIKit.h> | |
typedef void (^JCDActionSheetDelegateCallback)(UIActionSheet *actionSheet, NSInteger buttonIndex); | |
@interface JCDActionSheetDelegate : NSObject <UIActionSheetDelegate> |
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
- (UIImage *)resize:(CGSize)size quality:(CGInterpolationQuality)interpolationQuality | |
{ | |
UIGraphicsBeginImageContextWithOptions(size, NO, 1.0f); | |
CGContextRef context = UIGraphicsGetCurrentContext(); | |
CGContextSetInterpolationQuality(context, interpolationQuality); | |
[self drawInRect:CGRectMake(0.0, 0.0, size.width, size.height)]; | |
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); |
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
@property (nonatomic, assign) BOOL viewHasInitialLayout; | |
- (void)viewDidLayoutSubviews | |
{ | |
[super viewDidLayoutSubviews]; | |
if (!self.viewHasInitialLayout) { | |
// Do stuff | |
self.viewHasInitialLayout = YES; | |
} |
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
// | |
// NSManagedObject+MAK.h | |
// | |
// Created by Justin Driscoll on 2/21/12. | |
// | |
#import <CoreData/CoreData.h> | |
@interface NSManagedObject (MAK) |
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
// | |
// UITextView+Dimensions.h | |
// | |
// Created by Justin Driscoll on 1/6/12. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UITextView (Dimensions) |