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 request and complete, it is a println NSString represents the data it Received, and This is the main queue ( NSOperationQueue.mainQueue () ).

It holds in terms of deciphering, the focus is definition sendAsynchronousRequest function:

  sendAsynchronousRequest (function class _ request: NSURLRequest, Qatar Qatar: NSOperationQueue!, completionHandler handler: (NSURLResponse!, NSData!, NSError!) - & gt; zero)  

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, The received data, error syntax those three variables in NSURLResponse , NSData and NSError is to map> The completionHandler parameter in the parameter

In the programming language


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -