【发布时间】:2011-01-28 02:10:32
【问题描述】:
当用户在 tableView 中按下一行时,我正在尝试流式传输一些视频。我使用的是 iOS 4.2,当我按下一行时,我会听到声音,但 tableview 没有推开,你看不到视频?我确信这是一个巨大的新手错误但是......我是一个新手!提前谢谢!!!
-(void)tableView: (UITableView *)tableView didSelectRowAtIndexPath: (NSIndexPath *)indexPath {
NSString *video;
NSString *url;
NSUInteger row = [indexPath row];
video = [self.videoTitles objectAtIndex:row];
if ([video isEqualToString:@"Shimmy"]) {
url = @"http://www.andalee.com/iPhoneVideos/mov.MOV";
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:[NSURL URLWithString:url]];
[moviePlayer play];
} else if ([video isEqualToString:@"Camel"]) {
url = @"http://www.andalee.com/iPhoneVideos/mov.MOV";
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:[NSURL URLWithString:url]];
[[self view] addSubview:[moviePlayer view]];
[moviePlayer play];
}
[video release];
[url release];
}
【问题讨论】:
标签: uitableview ios4 mpmovieplayercontroller