Re: How to translate this form objc to swift? (__unsafe_unretained)
Re: How to translate this form objc to swift? (__unsafe_unretained)
- Subject: Re: How to translate this form objc to swift? (__unsafe_unretained)
- From: Jonathan Hull <email@hidden>
- Date: Tue, 24 Feb 2015 06:51:53 -0800
Off the top of my head (written in mail):
for (key,value) in headers {
request.setValue(value, forHTTPHeaderField: key)
}
Thanks,
Jon
> On Feb 23, 2015, at 6:55 AM, Juanjo Conti <email@hidden> wrote:
>
> NSUInteger count = [headers count];
> __unsafe_unretained id keys[count], values[count];
>
> [headers getObjects:values andKeys:keys];
>
> for (NSUInteger i=0;i<count;i++) {
> [request setValue:values[i] forHTTPHeaderField:keys[i]];
> }
>
> --
>
> Juanjo Conti <jjconti <http://goog_2023646312>@carouselapps.com
> <email@hidden>>
>
> Software Engineer - Carousel Apps <https://carouselapps.com>
>
> --
> Carousel Apps Limited, registered in England & Wales with registered number
> 7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket
> Street, London SE1 3HN. Any communication sent by or on behalf of Carousel
> App Ltd or any of its subsidiary, holding or affiliated companies or
> entities (together "Watu") is confidential and may be privileged or
> otherwise protected. If you receive it in error please inform us and then
> delete it from your system. You should not copy it or disclose its contents
> to anyone. Messages sent to and from Watu may be monitored to ensure
> compliance with our internal policies and to protect our business. Emails
> are not secure and cannot be guaranteed to be error free. Anyone who
> communicates with us by email is taken to accept these risks.
> _______________________________________________
>
> 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
_______________________________________________
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