hi i am new to iPhone App Development..In my app, i store video to documents folder and then retrieve them in another view..The view where videos are retrieved is not getting load..and i think my "viewdidload" or "cellforrowatindexpath" is not getting called...So somebody please tell me if there is something missing in code mentioned below....
- (void)viewDidLoad
{
tblView.delegate = self;
NSFileManager *filemgr = [NSFileManager defaultManager];
NSString *docDirPath = NSHomeDirectory();
docDirPath = [docDirPath stringByAppendingPathComponent:@"Documents"];
NSArray *filelist = [filemgr contentsOfDirectoryAtPath:docDirPath error:NULL];
NSLog(@"filelist = %@",filelist);
int count = [filelist count];
NSString *currentFileName;
videoListNames = [NSMutableArray array];
for (int j = 0; j<count; j++)
{
currentFileName = (NSString *)[filelist objectAtIndex:j];
if ([[currentFileName pathExtension] isEqualToString:@"avi"])
{
NSLog(@"currentFileName = %@",currentFileName);
[videoListNames addObject:currentFileName];
}
}
[tblView reloadData];
[super viewDidLoad];
}
---------------------------------------------------------------------------------------
- (UITableViewCell *)tableView

UITableView *)tableView cellForRowAtIndexPath

NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell =[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
//TRY TO REMOVE ALL CONTENT
for(UIView *view in cell.contentView.subviews){
if ([view isKindOfClass:[UIView class]]) {
[view removeFromSuperview];
}
}
// Configure the cell...
if (indexPath.row % 2 == 0)
{
cell.backgroundView =[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"Stript1.png"]];
}
else
cell.backgroundView =[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"Stript2.png"]];
cell.textLabel.backgroundColor = [UIColor clearColor];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.textLabel.text=[videoListNames objectAtIndex:indexPath.row];
NSLog(@"cell text = %@",cell.textLabel.text);
cell.textLabel.text = (NSString *)[assets objectAtIndex:indexPath.row];
return cell;
}
---------------------------------------------------------------------------------------