iPhone控件之MPMoviePlayerViewController

MPMoviePlayerViewController用于播放视频,用法如下:

NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"movie" ofType:@"mp4"];
NSURL *movieURL = [NSURL fileURLWithPath:moviePath];
MPMoviePlayerViewController *moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];
moviePlayerViewController.moviePlayer.controlStyle =  MPMovieControlStyleFullscreen;
 [self  presentMoviePlayerViewControllerAnimated:moviePlayerViewController]; 

持续更新中⋯⋯

posted @ 2012-04-13 08:00  FoxBabe  阅读(624)  评论(1编辑  收藏  举报