Hi there, is anybody already using Three20 URL-based Navigation with PureMVC?
I am not sure where to implement the URL mapping. In the AppDelegate, Faceade, RootViewController?
Thanks for helping.
Hi there, is anybody already using Three20 URL-based Navigation with PureMVC?
I am not sure where to implement the URL mapping. In the AppDelegate, Faceade, RootViewController?
Thanks for helping.
You set up the initial and regularly used URL mappings in the AppDelegate's applicationDidFinishLaunching function.
TTNavigator* navigator = [TTNavigator navigator];
TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[TTWebController class]];
[map from:@"tt://catalog" toViewController:[CatalogController class]];
You can add and remove URLs from the URL map at any time by doing the following:
[[TTNavigator navigator].URLMap from:@"tt://post" toViewController:self selector:@selector(post:)];
[[TTNavigator navigator].URLMap removeURL:@"tt://post"];
But why doesnt this work:
UIViewController *vc = [[TTNavigator navigator] viewControllerForURL:@"tt://post"];
[facade registerMediator:[BlogTableViewMediator withViewComponent:vc]];