Hi i am new to iphone.. I have stored the images in array .I want to know how to display those images in UIImageView ,where the UIImageView should be created dynamically according to filelist count increases, in for loop. this is the code
NSArray *filelist;
NSFileManager *filemgr;
int count;
int i=0;
int t=0;
filemgr = [NSFileManager defaultManager];
filelist = [filemgr directoryContentsAtPath: @"/Mypath/"];
NSMutableArray *imageVwArr = [[NSMutableArray alloc]init];
count = [filelist count];
count++;
for(i = 0; i < count; i++)
{
UIImageView *imgVw = [[UIImageView alloc] initWithImage:[filelist objectAtIndex:i]];
[imgVw setUserInteractionEnabled:YES];
[imgVw setTag:i];
imgVw.frame=CGRectMake(t, 0, 480, 320);
[imageVwArr addObject:imgVw];
[self.view addSubview:imgVw];
[imgVw release];
t=t+480;
}
it shows the error: terminate called after throwing an instance of 'NSException' Program received signal: “SIGABRT”.
where i did wrong i have no idea about creating dynamic uiimageview thanks in advance....