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!
精彩评论