Huohua/HHRouter — pull request #2 by jeslyvarghese (2014-03-28 19:08:21+00:00)
Title: Add routes for executing blocks

routable-ios has this feature as anonymous callbacks. Unlike the current structure which HHRouter follows, where a view controller instance gets returned for matching route with mathRoute: method, matching a block would merely execute the block.

I am not sure if it would be a good idea to follow the current structure, and return block with parameter supplied, I don't find any particular advantage in it, while for view controllers it provide a great amount of flexibility.

To prevent collision in terms of meaning where developers can get confused with view controllers and blocks, matchCallback:route and map:route toCallback: implemented separately.