On 5 Mar 2015, at 6:24 AM, John Tsombakos <[email protected]> wrote:
> I entered this line of code:
>
> let task = session.dataTaskWithRequest(request, completionHandler: {
> (myData, myResponse, myError) -> Void in
>
>
>
> });
>
> and when I go to write code in the completion handler block, Xcode does not
> recognize the variables that are being passed in - in this case myData,
> myResponse and myError.
>
> Ami I doing something wrong, or does XCode just not know how to do this?
Quincey’s advice is sound as to the coding style. Let me embarrass myself once
again; I’m working my way up to total humiliation, which gets you BOGO on all
Developer Programs renewals and the exemption of your choice from the
app-review guidelines:
My experience is that when the compiler claims not to recognize a function
parameter, it’s because something up the chain isn’t unwrapped (such as
session, here).
— F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com
This email sent to [email protected]