Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 使用Three20 TTURLMap自定义路由_Iphone_Three20 - Fatal编程技术网

Iphone 使用Three20 TTURLMap自定义路由

Iphone 使用Three20 TTURLMap自定义路由,iphone,three20,Iphone,Three20,我希望我的应用程序有不同的路由规则: *标准URL(http/https) *自定义URL:myApp://用户 *自定义URL 2:myApp://消息 在每种情况下,我都需要调用不同的控制器 目前,我在应用程序的委托中添加了一个TTURL映射: [map from:@"http://*" toViewController:[BrowserController class]]; [map from:@"https://*" toViewController:[BrowserController

我希望我的应用程序有不同的路由规则: *标准URL(http/https) *自定义URL:myApp://用户 *自定义URL 2:myApp://消息

在每种情况下,我都需要调用不同的控制器

目前,我在应用程序的委托中添加了一个TTURL映射:

[map from:@"http://*" toViewController:[BrowserController class]];
[map from:@"https://*" toViewController:[BrowserController class]];
[map from:@"myApp://user/*" toViewController:[TTWebController class]];
我的TTStyledTextLabel中有这样的文本:

[TTStyledText textFromXHTML:@"<a href=\"http://www.google.com\">link</a> from <a href=\"myApp://user/bob\">bob</a>"];
[ttstyledtexttextfromxhtml:@“from”];
但是,当我单击其中一个链接时,不会触发任何操作。
如何解决此问题?

我不确定您是否可以在
myApp://user/*
中使用通配符。如果要对参数(如“bob”)进行自定义初始化,则应查看TTNavigator的演示代码

两个参考资料:而且……我猜您需要
tt://
行,但我还没有充分挖掘他的代码来验证这一点。