joeldev / JLRoutes

URL routing library for iOS with a simple block-based API
BSD 3-Clause "New" or "Revised" License
5.7k stars 695 forks source link

Optional parameters #15

Closed hfossli closed 10 years ago

hfossli commented 11 years ago

Hi

In this example the article is an optional parameter.

  open/edition/:editionId
  open/edition/:editionId/article/:articleId

In kohana in php I can setup optional stuff by adding some paranthesis. Like this

  open/edition/:editionId(/article/:articleId)
joeldev commented 10 years ago

This is now implemented on the 2.0 branch. For more information, check out the tests: https://github.com/joeldev/JLRoutes/blob/2.0/JLRoutesTests/JLRoutesTests.m#L448

It even supports wildcards. :)