prank/Funny_sounds/Setting/C/FS_PrivacyVC.swift
2024-09-03 09:38:34 +08:00

46 lines
1009 B
Swift

//
// FS_PrivacyVC.swift
// Funny_sounds
//
// Created by 16 on 2024/8/27.
//
import UIKit
import WebKit
class FS_PrivacyVC: RootVC {
var privarURL = "https://daycount.bitbucket.io/privacy.html"
var termsURL = "https://daycount.bitbucket.io/terms.html"
var type:Int = 0
var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
webView = WKWebView()
view = webView
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.navigationBar.isHidden = true
if self.type == 0{
if let url = URL(string: termsURL) {
let request = URLRequest(url: url)
webView.load(request)
}
}else{
if let url = URL(string: privarURL) {
let request = URLRequest(url: url)
webView.load(request)
}
}
}
}