loadHTMLString加载HTML代码
1
2
|
NSString
*htmlString=
@"我的<b>iPhone</b>程序"
;
[
self
.myWebView
loadHTMLString
:htmlString
baseURL
:nil
];
|
加载HTML链接地址
1
2
3
4
5
|
UIWebView
*twoWebView =[[
UIWebView
alloc
]initWithFrame:CGRectMake(
0
,
1
0
0
,
2
0
0
,
1
0
0
)];
NSURLRequest
*request=[
NSURLRequest
requestWithURL
:urlBai];
[twoWebView
loadRequest
:request];
[webView
addSubview
:twoWebView];
|