- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *__strong)indexPath
{
TestViewController*detail = [self.storyboard instantiateViewControllerWithIdentifier:@"TestView"];
[self.navigationController pushViewController:detail animated: YES];
detail.outputLabel.text =[NSString stringWithFormat:[mutablearray1 objectAtIndex:indexPath.row]];
// detail.outputImage.image =[NSString stringWithFormat:[mutablearray2 objectAtIndex:indexPath.row]];
}
@end
使用上面的代碼我在tableview單元格中顯示文本以詳細視圖。如何顯示自定義單元格中的圖像到詳細視圖
我也希望相應於詳細視圖的每一行,以顯示圖像。問題出在我知道的評論部分。
修改什麼需要?
取消註釋時,我得到了錯誤:終止應用程序由於未捕獲的異常「NSInvalidArgumentException」,原因是:「 - [NSConcreteData getCharacters:範圍:]:無法識別的選擇發送到實例
這通常是當u已經在解除對象。檢查mutableArray2的內容是完整的 – 2011-12-21 11:40:44