开发者

How can we show the preview image of the video in table view cell?

I have a table view and if we touch a cell a video plays. I need to show the preview image of the video in the UITableViewCell. I have kept some dummy image in the cell at image place and remaining space ion cell is with some labels and buttons. I 开发者_JAVA技巧need the image preview of the video with play symbol on it. How can I make this ? Should I use any photoshop type of things or any programable things. I do not know photoshop. Thank You.


You can create the preview by displaying the preview image of your video. Once you add preview image, add sub view as button with play button image.

i.e..
previewImage = [[[UIImageView alloc] initWithFrame:CGRectMake(x,y,imageW,imageH)] autorelease];
previewImage.backgroundColor = [UIColor clearColor];
previewImage.image = [UIImage imageNamed:@"videoPreview.png"];
[cell.contentView addSubview:previewImage];


playButton = [UIButton buttonWithType:UIButtonTypeCustom];
playButton.frame = CGRectMake(x,y,buttonWidth,buttonHeight);
[playButton setImage:[UIImage imageNamed:@"playbutton.png"] forState:UIControlStateNormal];
[cell.contentView addSubview:playButton];

Hope this helps.

Thanks,
Jim.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜