Skip to content

Instantly share code, notes, and snippets.

View cruffenach's full-sized avatar

Collin Ruffenach cruffenach

View GitHub Profile
@cruffenach
cruffenach / BlogPost.h
Created July 13, 2011 17:00
Declaring instance variables for BlogPost
#import <Foundation/Foundation.h>
@class Author;
@interface BlogPost : NSObject {
NSString *_postName;
NSDate *_postDate;
Author *_author;
}
@cruffenach
cruffenach / BlogPost.h
Created July 13, 2011 17:31
BlogPost with Synthesized Properties
#import <Foundation/Foundation.h>
@class Author;
@interface BlogPost : NSObject {
NSString *_postName;
NSDate *_postDate;
Author *_author;
}
@cruffenach
cruffenach / BlogPost.m
Created July 13, 2011 17:41
Post Name Setter Override
-(void)setPostName:(NSString *)newPostName {
NSString *rawName = [newPostName stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
if([rawName isEqualToString:@""]) {
rawName = @"Blog Post Temp Name";
}
[rawName retain];
[_postName release];
_postName = rawName;
@cruffenach
cruffenach / RemoteUser.h
Created August 28, 2011 01:18
RemoteUser: A MaaSModel Representation of User Managed Object
#import <Foundation/Foundation.h>
#import <MaaSiveCoreData/MaaSiveCoreData.h>
@interface RemoteUser : MaaSModel
@property (nonatomic, retain) NSString * email;
@property (nonatomic, retain) NSString * displayName;
@end
@cruffenach
cruffenach / User.h
Created August 28, 2011 01:20
User Managed Object Example
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import <MaaSiveCoreData/MaaSEntity.h>
@class Message;
@interface User : NSManagedObject {
@private
}
@property (nonatomic, retain) NSString * email;
@cruffenach
cruffenach / Project-Prefix.pch
Created August 29, 2011 17:49
Prefix Header with helpful log methods DLog and DStep
//
// Prefix header for all source files
//
#ifdef __OBJC__
#endif
#ifndef DLog
#if kDebug
#define DLog( s, ... ) NSLog( @"\n\n************************************* DEBUG *************************************\n\t<%p %@:(%d)>\n\n\t%@\n*********************************************************************************\n\n", self, \
@cruffenach
cruffenach / ICBEncryptedString.h
Created October 9, 2011 20:39
An NSString subclass header for use with encrypted strings. For an article at www.iCodeBlog.com
#import <Foundation/Foundation.h>
@interface ICBEncryptedString : NSString {
NSString *_backingStore;
}
+(id)encryptedStringWithString:(NSString *)string;
-(id)initWithString:(NSString*)string;
@cruffenach
cruffenach / ICBEncryptedString.m
Created October 9, 2011 20:42
An NSString subclass main for use with encrypted strings. For an article at www.iCodeBlog.com
#import "MaaSEncryptedString.h"
#import "NSString+Helper.h"
@implementation MaaSEncryptedString
+(NSString*)encryptedString:(NSString*)string {
return [[NSString stringWithFormat:@"%@", [string SHA1]];
}
@cruffenach
cruffenach / gist:1732804
Created February 3, 2012 21:32
Grabbing the unknown category
We couldn’t find that file to show.
@cruffenach
cruffenach / gist:3824045
Created October 2, 2012 23:47
+QA Missed Issues

Overview

This document will act as a living document of issues shipped in the Simple iOS application that went uncaught by +QA

1.4.1 (9/28/12)

  • Tapping on an attached transaction in SFConversationCreationViewController presented the SFTransactionDetailViewController with the table view size incorrectly.
  • The tableview background for the periodicity selection for scheduled payments is incorrect.
  • The spinner in the SFContactsViewController is not shown when a contact is updated.