0
CGRect fullFrame = CGRectMake(10, 150, 300, 200);

UIWebView *fullTextView = [[UIWebView alloc] initWithFrame:fullFrame];
fullTextView.userInteractionEnabled = YES;

NSString *imagePath = [[MDImageManager sharedImageManager].imagesPath copy];
imagePath = [imagePath stringByReplacingOccurrencesOfString:@"/" withString:@"//"];
imagePath = [imagePath stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
NSString *imageName = [[MDImageManager sharedImageManager] loadImage:[NSURL URLWithString:currentCoupon.fullImageURL]];
NSString *HTMLData = [NSString stringWithFormat: @"<img src=%@ />", imageName];

[fullTextView loadHTMLString:HTMLData baseURL:[NSURL URLWithString: [NSString stringWithFormat:@"file:/%@//",imagePath]]];

[view addSubview:fullTextView];

图像加载并出现,但 web 视图没有滚动条!

fullTextView 被添加到视图控制器中,包含在导航 + 选项卡视图控制器中,这可能是问题吗?

非常感谢任何帮助!

杰拉德

4

1 回答 1

0

这不是导航或标签栏问题。

uiwebview包含一个uiscrollview作为provate属性,你不能正常访问。

您可以通过破解组件并找到 UIScrollview 子视图来找到 Uiscrollview,也可以自己直接使用具有 scrollIndicators 方法的 UIScrollView。

你也可以参考这篇文章: 如何显示 UIWebView 的滚动指示器

于 2010-08-25T13:41:06.503 回答