Three20多参数映射 TTUrlMap

首先要这样定义:

[map from:@"x://profile/(initWithId:)/(name:)" toViewController:[ProfileViewController class]];
[map from:@"*" toViewController:[TTWebController class]];

我在 ProfileViewController  中实现  - (id)initWithId:(int)anIdentifier name:(NSString *)name 来处理这种映射的选择器。

这样做的效果相当于调用

[[ProfileViewController alloc] initWithId:1 name:@"John Doe"] 来初始化控制器

posted on 2011-04-29 17:49  禚来强  阅读(370)  评论(0编辑  收藏  举报

导航