Edit: updated for ARC
typedef void(^MyCustomBlock)(void);
@interface MyClass : NSObject
@property (nonatomic, copy) MyCustomBlock customBlock;
@end
@implementation MyClass
@end
MyClass * c = [[MyClass alloc] init];
c.customBlock = ^{
NSLog(@"hello.....");
}
c.customBlock();