2010-10-11 52 views
0

我有一系列UITableView以水平ScrollView顯示。在每個tableview中,每個TableViewCell由2個代表詳細視圖的縮略圖圖塊組成。我正在使用touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event來捕獲其中一個瓦片已被挖掘。從那裏,我將一個詳細視圖推送到NavigationController並顯示不同的屏幕。這種交互在加載初始視圖時起作用。但是,如果您快速向上或向下滾動任何桌面視圖,touchesBegan事件將停止觸發。在此期間沒有收到內存警告。touchesBegan事件停止大量滾動後觸發

這裏是我使用的接收水龍頭視圖控制器內的代碼(tableviewcell內部的小瓦:

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 
    NSLog(@"Touched received on ArticleTileViewController"); 
    ArticleViewController *vc = [[ArticleViewController alloc] initWithArticleData:self.articleDataArray]; 
    ProjectAppDelegate *appDelegate = (ProjectAppDelegate *)[UIApplication sharedApplication].delegate; 

    [appDelegate.navController pushViewController:vc animated:YES]; 
} 

編輯:我也試圖與touchesEnded同樣的事情,相同的行爲結果。

我失去了一些東西在這裏?

回答

0

我切換到使用UITapGestureRecognizer。實現了快速,輕鬆地解決了這個!