嘿伙计们,我正在创建一个程序,它从数据库中获取图像并将其存储在数组中。但是在将它们存储在数组中之后,我无法显示它们。引发了一个异常,当我用断点检查它时,它在一行中给了我异常,这是我的代码和那一行,
data=[MyDatabase new];
slideImages=[data OpenMyDatabase:@"SELECT pic_name FROM exterior":@"pic_name"];
[self putImageViewsInScrollView:slideImages.count];
self.FullScreenImageScroller.delegate=self;
}
-(void) putImageViewsInScrollView:(int)numberOfImageViews
{
for(int i=0 ;i< numberOfImageViews; i++)
{
UIImageView *fullScreenImageView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:[slideImages objectAtIndex:i]]];
fullScreenImageView.frame = CGRectMake((WIDTH_OF_IMAGE * i) , 0, WIDTH_OF_IMAGE, HEIGHT_OF_IMAGE);
fullScreenImageView.image= [UIImage imageNamed:[slideImages objectAtIndex:i]];
[self.FullScreenImageScroller addSubview:fullScreenImageView];
}
[self.FullScreenImageScroller setContentSize:CGSizeMake(WIDTH_OF_SCROLL_PAGE * ([slideImages count]), HEIGHT_OF_IMAGE)];
[self.FullScreenImageScroller setContentOffset:CGPointMake(0, 0)];
[self.FullScreenImageScroller scrollRectToVisible:CGRectMake(WIDTH_OF_IMAGE,0,WIDTH_OF_IMAGE,HEIGHT_OF_IMAGE) animated:NO];
}
这是断点给出异常的代码行,
UIImageView *fullScreenImageView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:[slideImages objectAtIndex:i]]];
我现在该怎么办,提前帮助n谢谢...