Skip to content

Instantly share code, notes, and snippets.

@eralston
Created February 27, 2014 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eralston/9255531 to your computer and use it in GitHub Desktop.
Save eralston/9255531 to your computer and use it in GitHub Desktop.
An example of block typedefs in Objective-C
#ifndef Blocks_h
#define Blocks_h
#import <Foundation/Foundation.h>
typedef void (^VoidBlock)();
typedef BOOL (^ReturnBoolBlock)();
typedef void (^DictionaryBlock)(NSDictionary *dictionary);
typedef void (^TableCellIndexPathBlock)(UITableViewCell *cell,NSIndexPath *indexPath);
typedef UITableViewCell *(^ReturnTableCellForTableViewAndIndexPathBlock)(UITableView *tableView,NSIndexPath *indexPath);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment