代码如下
- ( IBAction )b1:( id )sender {
// 使用优酷的通用链接,去掉无用代码只留地址
//<iframe height=498 width=510 src="http://player.youku.com/embed/XNzk0MTgyOTgw" frameborder=0 allowfullscreen></iframe>
UIWebView *webView=[[ UIWebView alloc ] initWithFrame : CGRectMake ( 0 , 300 , self . view . frame . size . width , 300 )];
NSURL *url=[ NSURL URLWithString : @"http://player.youku.com/embed/XNzk0MTgyOTgw" ];
NSURLRequest *request=[[ NSURLRequest alloc ] initWithURL :url];
[webView loadRequest :request];
[ self . view addSubview :webView];
}