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視圖沒有滾動條!UIWebView不顯示iPhone模擬器上的滾動條
fullTextView被添加到視圖控制器,包含在導航+標籤欄視圖控制器,它可能是問題嗎?
任何幫助非常感謝!
傑拉德