我对three20还很陌生,所以请耐心听我说。我使用以下代码将对象加载到数据源:
- (void)loadView {
[super loadView];
self.navigationController.navigationBar.tintColor = [UIColor blackColor];
RKObjectTTTableViewDataSource* dataSource = [RKObjectTTTableViewDataSource dataSource];
[dataSource mapObjectClass:[Group class] toTableCellClass:[CCell class]];
RKObjectLoader* objectLoader = [[RKObjectManager sharedManager] objectLoaderWithResourcePath:@"/groups.json" delegate:nil];
dataSource.model = [RKObjectLoaderTTModel modelWithObjectLoader:objectLoader];
self.dataSource = dataSource;
}我已经按如下所示在appdelegate中设置了URL映射:
TTNavigator *navigator = [TTNavigator navigator];
navigator.window = self.window;
TTURLMap *map = navigator.URLMap;
[map from:@"tt://topics/(initWithTopicsIndex:)"
toSharedViewController:[TopicsViewController class]];当我点击手机时,我想按下另一个控制器,我该怎么做?我能通过TTTableViewCell中的setObject来做这件事吗?
发布于 2011-07-06 15:29:08
您的item类需要返回您希望在URLValue方法中导航到的URL。URLValue在NSObject上的一个类别中实现,并使用URLMap为对象创建URL。
如果您的项目是TTTableLinkedItem的子类,则它具有URL属性,而不使用URL属性。
看一看[TTTableViewController didSelectObject:(id)object atIndexPath:(NSIndexPath*)indexPath]
和[TTTableViewDelegate tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath]
https://stackoverflow.com/questions/6555070
复制相似问题