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 被添加到视图控制器中,包含在导航 + 选项卡视图控制器中,这可能是问题吗?
非常感谢任何帮助!
杰拉德