[swift-users] Webview with progress indicator issue
Kevin Nye
technologx at yahoo.com
Wed Dec 9 15:21:19 CST 2015
The progress indicator has no animation & the Facebook app uses Adobe so when I test my app the game won’t load.
Here’s my code:
import Cocoa
import WebKit
class ViewController: NSViewController {
@IBOutlet weak var webView: WebView!
@IBOutlet weak var progressIndicator: NSProgressIndicator!
override func viewDidLoad() {
super.viewDidLoad()
let urlString = "https://apps.facebook.com/thetribez"
self.webView.mainFrame.loadRequest(NSURLRequest(URL: NSURL(string: urlString)!))
}
override var representedObject: AnyObject? {
didSet {
// Update the view, if already loaded.
}
}
func webView(sender: WebView!, didStartProvisionalLoadForFrame frame: WebFrame!)
{
self.progressIndicator.startAnimation(self)
}
func webView(sender: WebView!, didFinishLoadForFrame frame: WebFrame!)
{
self.progressIndicator.stopAnimation(self)
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20151209/3da23c54/attachment.html>
More information about the swift-users
mailing list