我想将图像发送到下一个scent.but失败。prepareForSegue中的赋值为false
这里是我的代码
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
NSLog(@"prepareForSegue start");
NSLog(@"count is %d",count);
//bigStyle1 is a NSArray,full of UIImage
//bigImage is a UIImageView outlet
if ([bigStyle1 objectAtIndex:count]==nil) {
NSLog(@"no array image");
}
viewController3.bigImage.image=[bigStyle1 objectAtIndex:count];
if (viewController3.bigImage.image==nil) {
NSLog(@"no controller image");
}
NSLog(@"secondToThird");
NSLog(@"prepareForSegue end");
}
这里是Xcode的日志
2013-03-12 15:15:38.683 animation[1876:f803] prepareForSegue start
2013-03-12 15:15:50.825 animation[1876:f803] count is 0
2013-03-12 15:17:10.829 animation[1876:f803] no controller image
看来这个问题是image.Why分配的任务失败了吗?
UPDATE viewController3不nil.But bigImage是nil.I不知道why.I实际上bigImage连接到图像视图
你确定'bigStyle1'不为空? – Fonix 2013-03-12 07:54:03
'viewController3'是segue的目的地吗?设置'viewController3'的代码在哪里? – 2013-03-12 07:57:04
我敢肯定bigStyle1不是null,viewController3是由storyboard实例化的。 – 2013-03-12 08:04:58