不太確定如何解釋這一點,但在我的UITableView
我有一行代碼,當我點擊一個單元格時,它將帶我到一個新的視圖,它根據單元格的名稱更新它的標題。然而,如果我有兩個單元格,一個名爲'One',另一個名爲'Two',當我點擊'Two'時,它會將我帶到標題爲'One'的視圖,反之亦然。任何想法可能是造成這種情況的原因?對不起,我不能有更多的幫助。TableView加載錯誤的單元格
-(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
ACollection *newView = [[ACollection alloc] init];
newView.theTitle = [self.tableView cellForRowAtIndexPath:indexPath].textLabel.text;
[self.navigationController pushViewController:newView animated:YES];
}
只顯示您的代碼段...我想它的邏輯問題 –
提供更多的代碼.. w –
請發佈'didSelectRowAtIndexPath'代碼:) –