Add video to an iPad application [duplicate]
Possible Duplicate:
Using MPMoviePlayerViewController in SDK 3.2 for iPad
I am writing an application for iPad. till now I have a splash screen then a home screen. Home screen has 6 buttons. Pressing a button on the second or home screen takes you to the third screen which has two options a)Play Video b)read document. Now if play video is开发者_C百科 pressed it plays the video corresponding to the button pressed on second or home screen. similarly for the Read document, it opens a pdf file respective to the button pressed on home screen. Now I want to add video and pdf to those screens. how can i do it? Any help will be highly appreciated.
Best Regards Prateek
Just load the files into UIWebView
, it can handle both videos and PDFs.
To play the video use the movieplayer framework form apple. Have a look into the sample code from apple here http://developer.apple.com/library/ios/#samplecode/MoviePlayer_iPhone/index.html To read the PDF document and having some gestures for page turn use the following sample code form github: https://github.com/brow/leaves
精彩评论