hi im very new to ios i have read books beginner books and intermediate books, i understand ios put there are certain things i cant get done. im trying to put a thumbnail image of a .mov video into a cell like the youtube app i figured out how to do the thumbnail into UIImageView
NSString *videoPath = [[NSBundle mainBundle] pathForResource:@"e.mov" ofType:nil];
NSURL *videoURl = [[NSURL alloc ] initFileURLWithPath:videoPath];
AVURLAsset *asset = [[AVURLAsset alloc] initWithURL:videoURl options:nil];
AVAssetImageGenerator *generate = [[AVAssetImageGenerator alloc] initWithAsset:asset];
generate.appliesPreferredTrackTransform = YES;
NSError *err = NULL;
CMTime time = CMTimeMake(0.0, 600);
CMTime actualTime;
CGImageRef imgRef = [generate copyCGImageAtTime:time actualTime:&actualTime error:&err];
UIImage *img = [[UIImage alloc] initWithCGImage:imgRef];
[self.myImageView setImage:img];
thats what i have done to get the thumbnail image to the UIImageView on a standard UIViewController, i just cant figure out how to do it in a UITableViewCell
*cell;
I have 18 videos i want to display in the cells as thumbnails and once the cell is touched prepareForSegue: method is activated then it goes to the detailViewCOntroller
NSString *videoPath = [[NSBundle mainBundle] pathForResource:@"e.mov" ofType:nil];
How do i make this a NSMutableArray
and put it in
NSURL *videoURl = [[NSURL alloc ] initFileURLWithPath:videoPath];
and make it work in cells
basically i cant figure out how to display an array of videos as thumbnails in cells please help