Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I used to use a UINavigationController. I created it as a singleton and accessed it statically so I could push and pop controllers easily (theres a reasonably good tutorial <a href="http://www.shrinkrays.net/articles/monotouch-controllers-by-example/uinavigationcontroller-by-example.aspx" rel="nofollow">here</a>). This is quite lightweight and theres enough documentation to get going with it quickly.</p> <p>However the best approach I've used is the <a href="https://github.com/facebook/three20" rel="nofollow">Three20</a> framework's TTNavigator. In a nutshell its a beefed up UINavigator that lets you push a new view onto the screen by calling an internal URL:</p> <pre><code>//(In your app delegate) //Start up the navigator TTNavigator* navigator = [TTNavigator navigator]; navigator.persistenceMode = TTNavigatorPersistenceModeTop; //Map url's to controllers TTURLMap* map = navigator.URLMap; [map from:@"*" toViewController:[TTWebController class]]; [map from:@"ac://search" toViewController:[SearchViewController class]]; [map from:@"ac://results/(initToView:)" toViewController:[ResultsViewController class]]; </code></pre> <p>Then to navigate to a controller:</p> <pre><code>[[TTNavigator navigator] openURLAction:[[TTURLAction actionWithURLPath:@"ac://results/searchResults/"] applyAnimated:YES]]; </code></pre> <p>Whats also cool is that calling that @"ac://results/" the way we have above passes in the param @"searchResults" to the init method of the ResultsViewController ("initToView:") as we defined in the mapper </p> <p>All the best!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload