I need to load a video stored in Applications folder in to a UITableView ?

Posted by srikanth rongali on Stack Overflow See other posts from Stack Overflow or by srikanth rongali
Published on 2010-04-22T14:06:24Z Indexed on 2010/04/22 19:13 UTC
Read the original article Hit count: 398

I need to load a video stored in Applications folder in to a table view. When I touched the cell the video plays.

I used the following code to get all the video files in to an array.

    NSFileManager *fileManager = [NSFileManager defaultManager];
    NSArray* contents = [fileManager directoryContentsAtPath:@"/Users/srikanth/Desktop/Projects/UF/Table2/Videos"];
    for(a = 1; a < [contents count]; a++)
        NSLog(@"Array contents: %@", [contents objectAtIndex:a]);
    cells = [[NSMutableArray alloc]initWithCapacity:[contents count]];  

But how can I load the videos into UITableView. I used NSBundle for loading videos by giving path. It worked. But, now I need the videos to load from the array contents. When I touch the cell of the table the corresponding file from the array contents si to be loaded. How can I make it? Thank you.

© Stack Overflow or respective owner

Related posts about cocoa-touch

Related posts about iphone-sdk