0
我對three20相當新,所以忍受着我。我有加載的對象的數據源以下代碼:網址導航在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;
}
我已經設置了一個URL映射在的appdelegate如下:
TTNavigator *navigator = [TTNavigator navigator];
navigator.window = self.window;
TTURLMap *map = navigator.URLMap;
[map from:@"tt://topics/(initWithTopicsIndex:)"
toSharedViewController:[TopicsViewController class]];
我想,當我輕按推另一控制器在牢房上,我該怎麼做?我可以通過TTTableViewCell中的setObject來做到這一點嗎?
我看着didSelectRowAtIndexPath方法和它打印東西時,我點擊了排 – adit
是什麼打印?執行任何時候到達'TTOpenURLFromView(URL,self.view);'在這些方法中的任何一個?你試圖打開的URL是什麼樣的? – tonklon
也許我在這裏沒有提供足夠的信息,我有一個自定義單元,它的子類TTTableLinkedItemCell,並且通過setObject:(id)對象方法設置所有內容。是的,該項目是TTTableLinkedItem的子類,但該URL尚未在setObject方法之前設置。我做了一個NSLog - (void)didSelectObject:(id)對象atIndexPath:(NSIndexPath *)indexPath,打印對象的URL,但它是空的。爲什麼是這樣?我在setObject上設置了這個URL。 – adit