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
2010-04-20 05:33:05
Thank you Jim. I am trying on it now.
srikanth rongali
2010-04-21 03:42:03
It worked Jim. Thanks a lot.
srikanth rongali
2010-04-21 04:35:08