Re: Simple Swift question
Re: Simple Swift question
- Subject: Re: Simple Swift question
- From: Jens Alfke <email@hidden>
- Date: Mon, 29 Jun 2015 16:17:05 -0700
> On Jun 29, 2015, at 3:53 PM, Rick Mann <email@hidden> wrote:
>
> The compiler's message was, "Could not find an overload for 'init' that accepts the supplied arguments." Could it instead say "NSURLRequst.init(URL:) does not return Optional type"?
The error message looks correct to me — it's complaining about passing the variable ‘url’ (an NSURL?) to the NSURLRequest initializer (which takes a non-optional NSURL.)
I don’t see any reason the compiler would complain about the return type of NSURLRequest.init, since all you’re doing is assigning it to a constant without giving a type.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden