我是 iPhone 开发的新手,我正在尝试将 HTML 对象加载到UIWebView
.
问题是当我将 HTML 数据转换为字符串时,应用程序崩溃并显示EXC_BAD_ACCESS
. 该对象是一个brightcove视频,我直接从brightcove网站复制了嵌入代码,所以我不明白为什么它不起作用。任何帮助是极大的赞赏。
代码:
NSString *brightstring = [NSString stringWithFormat:@"<html><body><object id=flashObj width=540 height=400 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0><param name=movie value=http://c.brightcove.com/services/viewer/federated_f9?isVid=1 /><param name=bgcolor value=#FFFFFF /><param name=flashVars value=videoId=%@&playerID=659636031001&playerKey=AQ~~,AAAAC59qSJk~,vyxcsD3OtBM6WfpHEsDft5laXH9ASJhF&domain=embed&dynamicStreaming=true /><param name=base value=http://admin.brightcove.com /><param name=seamlesstabbing value=false /><param name=allowFullScreen value=true /><param name=swLiveConnect value=true /><param name=allowScriptAccess value=always /><embed src=http://c.brightcove.com/services/viewer/federated_f9?isVid=1 bgcolor=#FFFFFF flashVars=videoId=%@&playerID=659636031001&playerKey=AQ~~,AAAAC59qSJk~,vyxcsD3OtBM6WfpHEsDft5laXH9ASJhF&domain=embed&dynamicStreaming=true base=http://admin.brightcove.com name=flashObj width=540 height=400 seamlesstabbing=false type=application/x-shockwave-flash allowFullScreen=true swLiveConnect=true allowScriptAccess=always pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></embed></object></body></html>", clipid]; //<--Crashes Here
NSString* html = [NSString stringWithFormat:brightstring, 540, 400];
[videoScreen loadHTMLString:html baseURL:nil];