tags:

views:

30

answers:

1

Hello, I would like to have different routing rule for my application: * standard URL (http/https) * custom URL : myApp://user * custom URL 2 : myApp://message

In each case, I need to call a different controller.

For the moment, I added a TTURL Map in the Delegate of my application:

[map from:@"http://*" toViewController:[BrowserController class]];
[map from:@"https://*" toViewController:[BrowserController class]];
[map from:@"myApp://user/*" toViewController:[TTWebController class]];

and I have such text in my TTStyledTextLabel:

[TTStyledText textFromXHTML:@"<a href=\"http://www.google.com\"&gt;link&lt;/a&gt; from <a href=\"myApp://user/bob\">bob</a>"];

However, there is no action triggered when I click on one of the link. How could I solve this problem?

A: 

I'm not sure you can use the wildcard in myApp://user/*. You should review the demo code for TTNavigator if you want to do custom initialization for parameters (such as "bob").

Michael Grinich