webViewDidFinishLoad
和webView.delegate = self;
无效。
我已经做过的事情:
UIWebViewDelegate
viewDidAppear
func webViewDidStartLoad(webView: UIWebView!) {
print("Webview started Loading")
}
func webViewDidFinishLoad(webView: UIWebView!) {
print("Webview did finish load")
}
。以下是代码:
sudo rasps-config
答案 0 :(得分:5)
检查这个工作正常的简单示例代码:
import UIKit
class ViewController: UIViewController, UIWebViewDelegate {
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = "http://apple.com"
let requestURL = NSURL(string:url)
let request = NSURLRequest(URL: requestURL!)
webView.delegate = self
webView.loadRequest(request)
}
func webViewDidStartLoad(webView: UIWebView) {
print("Webview started Loading")
}
func webViewDidFinishLoad(webView: UIWebView) {
print("Webview did finish load")
}
}
答案 1 :(得分:2)
Swift 3的更新
0 * * * * sshpass -p password sftp username@X.X.X.X:/Files/$(date +"\%Y-\%m-\%d-\%H" -d "-7 hours").zip $HOME/local_machine/$(date +"\%Y-\%m-\%d" -d "-7 hours")/"
}