我在UIWebView
上有UIView
,它从服务器加载内容。
UIWebView
内容未在屏幕上显示。
我的代码出了什么问题?
vwWebView = [[UIView alloc]init];
vwWebView.frame=CGRectMake(10, 20, [GRAPHICS SCREEN_WIDTH]-40,[GRAPHICS SCREEN_HEIGHT]-20);
vwWebView.layer.borderWidth = 3.0;
vwWebView.layer.borderColor = [[UIColor colorWithRed:207.0 / 255.0
green:207.0 / 255.0
blue:207.0 / 255.0
alpha:1.0] CGColor];
vwWebView.layer.cornerRadius = 3.0;
vwWebView.backgroundColor = [UIColor whiteColor];
m_webView = [[UIWebView alloc] init];
m_webView.autoresizesSubviews = YES;
m_webView.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
m_webView.opaque = NO;
m_webView.delegate = self;
m_webView.scrollView.scrollEnabled=YES;
m_webView.backgroundColor = [UIColor lightGrayColor];
[vwWebView addSubview:m_webView];
[self.view addSubview:vwWebView];
-(void)API_CALLBACK_TermsAndConditions:(NSDictionary *)responseDict
{
NSString *strCondition = [[NSString alloc] initWithString:[responseDict objectForKey:@"msg"]];
NSString *loadString=[NSString stringWithFormat:@"<html><body text=\"#FFA500\">%@</body></html>", strCondition];
[m_webView loadHTMLString:loadString baseURL:nil];
}