开发者

how to play video files by using UITableView?

开发者 https://www.devze.com 2022-12-27 00:28 出处:网络
In my iPhone application I need to show a video image in UITableView. Each tableViewCell have video开发者_如何学编程 and some labels. I used the MPMoviePlayerController for showing video in full scree

In my iPhone application I need to show a video image in UITableView. Each tableViewCell have video开发者_如何学编程 and some labels. I used the MPMoviePlayerController for showing video in full screen when the cell is selected. But, I am getting error that MPMoviePlayerController class is not there. I tried using UIWebView. But, I could not make it. How can I play a video, when the cell is selected. Some say that videos do not play in simulator. They only play when we test in device. Is it right ? Please help me with the solution.

Thank You.


When you get a linker error like this complaining that a Cocoa Touch class is missing, it typically means you need to add a framework to your project. The top of the reference document for each class identifies which framework provides it.

In this case, the documentation for MPMoviePlayerController indicates that the class is provided by MediaPlayer.framework. To add it, right click on Frameworks in your project tree, and select Add -> Existing Frameworks... -> MediaPlayer.framework -> Add.

0

精彩评论

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