Tuesday, October 13, 2015

NSURLConnection Syntax for Swift 2.0

NSURLConnection Syntax for Swift 1.2

var jsonSource: NSData =  NSURLConnection.sendSynchronousRequest(URLrequest, returningResponse: response, error:nil)!



NSURLConnection Syntax for Swift 2.0

let jsonSource: NSData =  try! NSURLConnection.sendSynchronousRequest(URLrequest, returningResponse: response)

No comments:

Post a Comment