Reputation: 1516
I created a UiWebView where a responsive app is loaded.
Now I want to check whether the page that is accessed throws the web or the native app.
To do this I need to insert specific html in my "uiwebview".
For now I have this:
import UIKit
class ViewController: UIViewController {
@IBOutlet var WebView: UIWebView!
override func prefersStatusBarHidden() -> Bool {
return true;
}
override func viewDidLoad() {
super.viewDidLoad()
var Url = NSURL(string: "http://localhost:8888")
WebView.loadRequest(NSURLRequest(URL: Url!))
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
Upvotes: 0
Views: 700
Reputation: 721
check out the UIWebViewDelegate methods https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebViewDelegate_Protocol/
Upvotes: 2