Commit f3b55ee7 authored by ftao's avatar ftao
Browse files

# 0.1.0 版本

- 支持横竖屏
- 添加蒲公英下载地址
parent 5e63d67b
......@@ -28,6 +28,12 @@ UIWebView 在 iOS 11.3 上设置 inline playback 无效,iOS 11.0.3 上可以
- 自动全屏
- 自动播放
[下载调试](https://www.pgyer.com/j9Vw),密码 polyv
![蒲公英下载地址](https://www.pgyer.com/app/qrcode/j9Vw)
### 参考资料
- [UIWebView 官方文档](https://developer.apple.com/documentation/uikit/uiwebview?language=objc)
......
......@@ -396,7 +396,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = ETRBR9HA5V;
DEVELOPMENT_TEAM = 8BMZBNN3Q5;
INFOPLIST_FILE = "WebView-Test/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......@@ -412,7 +412,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = ETRBR9HA5V;
DEVELOPMENT_TEAM = 8BMZBNN3Q5;
INFOPLIST_FILE = "WebView-Test/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......
......@@ -4,6 +4,8 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>WebViewTest</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
......@@ -15,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
......@@ -36,6 +38,8 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
......
......@@ -54,7 +54,7 @@
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
NSURL *urlPath = [NSURL URLWithString:self.urlLabel.text];
// 配置 webView 请求体参数,使用默认缓存策略,超时时间设置为 15.0 s
// 配置 webView 请求体参数,使用忽略存储数据缓存策略,超时时间设置为 15.0 s
NSURLRequest *request = [NSURLRequest requestWithURL:urlPath cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:15.0];
UIViewController *viewController = [segue destinationViewController];
......
......@@ -37,6 +37,7 @@
// 使用 WKWebViewConfiguration 初始化 WKWebView
self.wkWebView = [[WKWebView alloc] initWithFrame:self.view.bounds configuration:configuration];
self.wkWebView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.wkWebView loadRequest:self.request];
self.wkWebView.navigationDelegate = self;
self.wkWebView.UIDelegate = self;
......@@ -129,6 +130,16 @@
// Dispose of any resources that can be recreated.
}
#pragma mark - view control
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
- (BOOL)shouldAutorotate {
return YES;
}
/*
#pragma mark - Navigation
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment