【发布时间】:2011-03-24 21:22:07
【问题描述】:
在我的 viewControllerOne 中,我正在使用 tableview..当我点击任何行时..我正在使用此代码..导航到另一个页面...
Feches *rOVc = [[Feches alloc] initWithNibName:@"Feches" bundle:nil]; rOVc.hidesBottomBarWhenPushed = YES; rOVc.title = [NSString stringWithFormat:@"15 March 2011"]; rOVc.strURL = [[NSString alloc] initWithString:[[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"first_screen" ofType:@"png"]] absoluteString]]; [self.navigationController pushViewController:rOVc animated:YES]; [rOVc release];
现在当它导航到 Feches...
在获取的 viewdidload 中,我正在使用此代码...
NSString *html = [NSString stringWithFormat:@"<html><head>\
<meta id='viewport' name='viewport' content='minimum-scale=0.2; maximum-scale=5; user-scalable=1;' />\
</head><body style=\"margin:0\"><img id=\"yt\" src=\"%@\"></body></html>", self.strURL];
NSLog(@"html:%@",html);
// Load the html into the webview
if(self.myWeb == nil) {
self.myWeb = [[UIWebView alloc] initWithFrame:self.view.frame];
[self.view addSubview:self.myWeb];
}
[self.myWeb loadHTMLString:html baseURL:[NSURL URLWithString:self.strURL]];
这正在向我显示名为...first_screen 的图像,它位于我的图像文件夹中...
现在...我想使用文本段落而不是图像...但是使用相同类型的 html 和所有这些...任何人都可以建议我现在需要做哪些更改来显示段落而不是图片??
【问题讨论】:
标签: iphone html ios uiimageview uitextfield