Skip to content

Instantly share code, notes, and snippets.

View hashier's full-sized avatar
🦆

Christopher Loessl hashier

🦆
View GitHub Profile
@hashier
hashier / block copy.m
Created May 13, 2014 17:42
How to call blocks?
#import <Foundation/Foundation.h>
// 2nd class
@interface DownTheLine : NSObject
@end
@implementation DownTheLine
-(void)deepDown:(void (^)(int var))completionHandler {
completionHandler(4);
@hashier
hashier / .lldbinit
Last active August 29, 2015 13:59 — forked from mayoff/.lldbinit
command script import ~/Library/lldb/sniff_objc_exception_throw.py
@hashier
hashier / block.m
Last active August 29, 2015 13:56
Blocks on stack and on the heap and pointers to it
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
typedef int(^Block)(void);
void *p0, *p1;
Block blockOnStack[3];
@hashier
hashier / strong-copy.m
Created February 25, 2014 21:23
Property: What's the difference between strong and copy. Blogpost: http://stackenblochen.blogsport.eu/2014/02/25/property-strong-and-copy/
//
// main.m
// strong_retain_copy
//
// Created by Christopher Loessl on 25/02/14.
// Copyright (c) 2014 Christopher Loessl. All rights reserved.
//
#import <Foundation/Foundation.h>