1

我正在开发视频应用程序,我的视频可在 apache 服务器上使用,该服务器具有192.1.58.1/3434 之类的链接。该链接包含 mp4 文件,例如 a.mp4、b.mp4、c.mp4。当您单击这些链接时,它会在浏览器中加载视频。我的问题是如何将这些链接放入我的 iphone 应用程序。我尝试了很多但没有找到解决方案。请帮帮我。

4

1 回答 1

0

把 aUIWebView放进你的UIViewController(我叫我的myWebView)。然后,在您的UIViewController实现文件中,将其添加到您的viewDidLoad方法中。

- (void)viewDidLoad
{
    [super viewDidLoad];
    NSString* myServerString = @"http://192.1.58.1";
    NSURL* myServerURL = [NSURL URLWithString:myServerString];
    NSURLRequest* myRequest = [[NSURLRequest alloc] initWithURL:myServerURL];
    [self.myWebView  loadRequest:myRequest];
}
于 2012-04-12T21:28:12.673 回答