我试图在构建表格视图单元格时将字符串的值从数组传递给实例ImageViewer
,但我得到 nil 值。这是代码:
NSString *file = [[NSString alloc] init ];
file = [photoFiles objectAtIndex:indexPath.row];
ImageViewer *imageView = [[ImageViewer alloc] initWithNibName:@"ImageViewer" bundle:nil];
imageView.fileName = file;
[self.navigationController pushViewController:imageView animated:YES];
[imageView release];
你能帮我解决这个问题吗?