- UIView *view = [[ UIView alloc] initWithFrame:[ UIScreen
- mainScreen].applicationFrame] ;
- self.view = view;
- CGRect webFrame = CGRectMake(0.0,0.0,350.0,450.0);
- //webFrame.origin.y+=25;
- UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];
- [webView setBackgroundColor:[UIColor whiteColor]];//设置北京为白色
- webView.scalesPageToFit = YES;//适应屏幕大小
- NSString * strURL = @"http://blog.csdn.net/m_changgong";
- NSURL * url = [NSURL URLWithString:strURL];
- NSURLRequest * request = [NSURLRequest requestWithURL:url];
- [webView loadRequest:request];
- [self.view addSubview:webView];
- [webView release];
NSURL * url = [[NSBundle mainBundle] URLForResource:@"userProtocol" withExtension:@".rtf"];
NSURLRequest * request = [NSURLRequest requestWithURL:url];
[self.protoWebView loadRequest:request];