English 中文(简体)
在我的申请中添加你的录像
原标题:Adding youtube video to my application

这就是在我的项目中增加一个“你”录像的方法;我已经将这些录像带上了眼光。

UIWebView *web = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 480, 300)]; 
NSString *html = @"<html><head> .........."; // its too long so i cut it short
[webView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://www.youtube.com/embed/vLBKOcUbHR0"]];

    [self.view addSubview:web]; 

这一观点;

enter image description here

而我所希望的是,像现在这样一些事情。

“entergraph

如果你看得更贴近,你就会看到一个工具Bar和一个D-1纽顿,并看到第二个形象中的“倡议”指标,而其中没有一个是在地雷中显示。 如何解决这一问题?

最佳回答

That s not really how you use baseURL. The Base URL is what relative links will be relative to if there are links in the HTML - mapping it to youtube probably won t help at all.

相反,只是抄录了你管的嵌入代码,这似乎就是:

<iframe width="420" height="315" src="http://www.youtube.com/embed/2WNrx2jq184" frameborder="0" allowfullscreen></iframe>

• 直接从您的网页上读到URL:

NSURL *URL = [NSURL URLWithString:@"http://www.youtube.com/embed/2WNrx2jq184"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
[webView loadRequest:request];

这应当奏效。

问题回答

暂无回答




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签