I want load request and when it loaded, I want get url. Can anyone tell what problem in my code?
let url = NSURL(string: "https://oauth.vk.com/authorize?client_id=4876947&scope=audio&redirect_uri=https://oauth.vk.com/blank.html&display=mobile&v=5.30&response_type=token")
let request = NSURLRequest(URL : url!)
webView.loadRequest(request)
if let currURL: NSString = webView.request?.URL?.absoluteString! {
getData(currURL)
}
My error:
erminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key web.' *** First throw call stack