****
02-ASI01-基本使用(了解)
03-ASI02-其他用法(了解)
04-ASI03-POST请求(了解)
05-ASI04-文件下载(了解)
06-ASI05-文件上传(了解)
07-UIWebView01-基本使用(了解)
08-网页开发学习
#import "HMViewController.h" @interface HMViewController () @property (weak, nonatomic) IBOutlet UIWebView *webView; @end @implementation HMViewController - (void)viewDidLoad { [super viewDidLoad]; self.webView.scrollView.backgroundColor = [UIColor redColor]; // NSURL *url = [NSURL URLWithString:@"http://localhost:8080/MJServer/resources/videos/minion_01.mp4"]; // NSURL *url = [[NSBundle mainBundle] URLForResource:@"02-HTTP" withExtension:@"pptx"]; // HTML5 NSURL *url = [[NSBundle mainBundle] URLForResource:@"salary" withExtension:@"html"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; // 根据请求去加载对应的资源 [self.webView loadRequest:request]; // 伸缩页面到填充整个webView self.webView.scalesPageToFit = YES; } @end
时间: 2024-11-02 20:43:14