views:

38

answers:

1

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 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.

A: 

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.

Jim
Thank you Jim. I am trying on it now.
srikanth rongali
It worked Jim. Thanks a lot.
srikanth rongali