diff --git a/DGCAWallet/Storyboards/Base.lproj/Settings.storyboard b/DGCAWallet/Storyboards/Base.lproj/Settings.storyboard
index c4f34fd..6143c85 100644
--- a/DGCAWallet/Storyboards/Base.lproj/Settings.storyboard
+++ b/DGCAWallet/Storyboards/Base.lproj/Settings.storyboard
@@ -195,7 +195,7 @@
-
+
@@ -251,7 +251,7 @@
-
+
diff --git a/DGCAWallet/ViewControllers/LicenseVC.swift b/DGCAWallet/ViewControllers/LicenseVC.swift
index 8294f5c..be30061 100644
--- a/DGCAWallet/ViewControllers/LicenseVC.swift
+++ b/DGCAWallet/ViewControllers/LicenseVC.swift
@@ -32,37 +32,41 @@ import WebKit
class LicenseVC: UIViewController, WKNavigationDelegate {
@IBOutlet weak var packageNameLabel: UILabel!
@IBOutlet weak var licenseWebView: WKWebView!
- @IBOutlet weak var githubUrlLabel: UILabel!
@IBOutlet weak var activityIndicator: UIActivityIndicatorView!
var licenseObject: JSON = []
override func viewDidLoad() {
super.viewDidLoad()
- self.packageNameLabel.text = licenseObject["name"].string
- self.licenseWebView.isUserInteractionEnabled = false
- self.licenseWebView.navigationDelegate = self
-
+ packageNameLabel.text = licenseObject["name"].string
+ licenseWebView.isUserInteractionEnabled = false
+ licenseWebView.navigationDelegate = self
+ if #available(iOS 13.0, *) {
+ activityIndicator.style = .medium
+ } else {
+ activityIndicator.style = .gray
+ }
+
if let licenseUrl = licenseObject["licenseUrl"].string {
loadWebView(licenseUrl)
}
}
func loadWebView(_ packageLink: String) {
- DispatchQueue.main.async {
- let request = URLRequest(url: URL(string: packageLink)!)
- self.licenseWebView?.load(request)
+ DispatchQueue.main.async { [weak self] in
+ let request = URLRequest(url: URL(string: packageLink)!)
+ self?.licenseWebView?.load(request)
}
- self.activityIndicator.startAnimating()
- self.licenseWebView.navigationDelegate = self
+ activityIndicator.startAnimating()
+ licenseWebView.navigationDelegate = self
}
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
- self.activityIndicator.stopAnimating()
+ activityIndicator.stopAnimating()
}
func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {
- self.activityIndicator.stopAnimating()
+ activityIndicator.stopAnimating()
}
}