ios - .mov files into an NSArray -


i have put in method creates thumbnail image of video me

- (uiimage *)loadimage:(nsstring *)image {     // getting frame of video thumbnail     nsstring *videopath = [[nsbundle mainbundle] pathforresource:image oftype:nil];     nsurl *vidurl = [[nsurl alloc] initfileurlwithpath:videopath];     avurlasset *asset = [[avurlasset alloc ] initwithurl:vidurl options:nil];     avassetimagegenerator *generate = [[avassetimagegenerator alloc] initwithasset:asset];     nserror *err = null;     cmtime time = cmtimemake(1, 30);     cgimageref thumbimg = [generate copycgimageattime:time actualtime:null error:&err];      return [[uiimage alloc] initwithcgimage:thumbimg]; } 

now have list of .mov files wish place array , place thumbnail images of each cells once cell has been touched go detailedviewcontroller , .mov start play automatically.

my question how put .mov files array, , if 1 of parameters in method above need (nsarray *) right ? yes/no , me on making file play in detailedviewcontroller need avfoundation mpmovieplayercontroller.

thanks

make list of video url instead of .mov files.

 - (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:@"cell"];     }     cell.imageview.image=[self loadimage:[arrvideopath objectatindex:indexpath.row]];     return cell } 

Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -