iphone - How to Show Video thumbnails in UITableview? -
in application video link sever in uitableview .all these link store in text file on server.but want thumbnails of these link in uitableview. here image .

as screen shot show link fetch server no thumbnails of these link show in red circle. these red circles webviews.here code.
- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { static nsstring *customcellidentifier = @"customcellidentifier "; customcell *cell = (customcell *)[tableview dequeuereusablecellwithidentifier: customcellidentifier]; if (cell == nil) { nsarray *nib = [[nsbundle mainbundle] loadnibnamed:@"customcell" owner:self options:nil]; cell = [nib objectatindex:0]; } // set cell. nsstring *embedhtml = @"\ <html><head>\ <style type=\"text/css\">\ body {\ background-color: transparent;\ color: white;\ }\ </style>\ </head><body style=\"margin:0\">\ <embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ width=\"%0.0f\" height=\"%0.0f\"></embed>\ </body></html>"; nsstring *html = [nsstring stringwithformat:embedhtml, [listdata objectatindex:indexpath.row], cell.websal.frame.size.width, cell.websal.frame.size.height]; cell.lblsal.text = [listdata objectatindex:indexpath.row]; [cell.websal loadhtmlstring:html baseurl:nil]; return cell; } when use nslog show thing this.
1 can guide me mistake make.thanx in advance.
you testing on simulator. thumbnails won't displayed on simulator. can see video thumbnail when run in device.
Comments
Post a Comment