ios - What does these (response, data, error) in println(NSString(data: data, encoding: NSUTF8StringEncoding)) means in swift? -
After
Can anyone tell me what the code means below I am trying to learn faster and I was not considered under the lines.
NSURLConnection.sendAsynchronousRequest (request line: Ansopreshn Kyuukmancwu ()) in Println ((feedback, data, error) NSString (data: data encoding: NSUTF8StringEncoding).)} Thank you very much for your time
in this asynchronous network It holds in terms of deciphering, the focus is he closed the third parameter to the syntax "following completion taking advantage of" syntax , Which allows a blocking parameter as a block after the function and thus, println NSString represents the data it Received, and This is the main queue ( NSOperationQueue.mainQueue () ). definition sendAsynchronousRequest function:
sendAsynchronousRequest (function class _ request: NSURLRequest, Qatar Qatar: NSOperationQueue!, completionHandler handler: (NSURLResponse!, NSData!, NSError!) - & gt; zero) The received data, error syntax those three variables in NSURLResponse , NSData and NSError is to map> The completionHandler parameter in the parameter
Comments
Post a Comment