I have a UIVivewController which inherits UIWebViewDelegate. When I receive at push notification and handle that notification on the Appdelegate. How do I access the webview object to change location of the page.
class WebViewController: UIViewController,UIWebViewDelegate {
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
let url = NSURL(string: "WEBURL")
let request = NSURLRequest(URL: url!)
webView.loadRequest(request)
webView.delegate = self
}
appdelegate
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
webview.Load(userinfo["link"]) //I need to accesss the webview object
}