Skip to content

Instantly share code, notes, and snippets.

View pieteromvlee's full-sized avatar

Pieter pieteromvlee

View GitHub Profile
@pieteromvlee
pieteromvlee / gist:4066820
Created November 13, 2012 16:36
Always Initialize your Local Primitives
- (BOOL)performSomeKindOfTest {
BOOL testResult;
//more code
if (....) {
//more code
testResult = YES;
}
return testResult;
}
@pieteromvlee
pieteromvlee / ShakeAnimation.m
Created September 7, 2012 16:03
ShakeAnimation; a variant on @danielctull's versopm
@implementation ShakeAnimation {
CGRect originalRect;
NSInteger counter;
}
+ (void)shakeView:(UIView *)view {
[[[[self class] alloc] initWithView:view] shake];
}
- (id)initWithView:(UIView *)view {