开发者

Adding video files in iPhone

I am new to iPhone. I need sample cod开发者_如何学Pythone for how to add video files in iPhone.


Include the media player framework then do this:

MPMoviePlayerViewController *mediaPlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:@"http://mywebsite.com/movie.mov"]]; // this can be an NSURL to a file in your bundle
 [self presentMoviePlayerViewControllerAnimated:mediaPlayer];
 mediaPlayer.view.backgroundColor = [UIColor blackColor];
 [mediaPlayer release];

there are notifications and callbacks, but this is the basics.


you can find basically all the things you need here --> http://pdfcast.org/pdf/the-objective-c-programming-language ... download the pdf... enjoy!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜