Pierre Bernard

My little hideout on the net

Xcode user script: PropertyFromInstanceVariable

Wrote some Perl today. No, I don't know Perl. Turns out it is good at handling strings.I stumbled upon a blog post on Cocoa with Love. Matt Gallagher has devised this excellent Xcode user script to generate @property declarations and @synthesize statements from variable declarations. This is triple great:1. The script will save me quite some typing2. I had never noticed the Xcode script menu3. Matt
Read More....
Comments (1)

NSObject (HHBlockPerform): delayed block executions

typedef void (^HHPerformBlock)(id owner);@interface NSObject (HHBlockPerform)- (void)performAfterDelay:(NSTimeInterval)delay block:(HHPerformBlock)block;@end@implementation NSObject (HHBlockPerform)- (void)performAfterDelay:(NSTimeInterval)delay block:(HHPerformBlock)block{ [self performSelector:@selector(runBlock:) withObject:[block copy] afterDelay:delay];}- (void)runBlock:(HHPerformBlock)block{ block(self); [block
Read More....
Comments (1)