Re: Creating Url with Fragment
Re: Creating Url with Fragment
- Subject: Re: Creating Url with Fragment
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Thu, 22 May 2014 19:36:23 +0700
On 22 May 2014, at 17:25, Mike Abdullah <email@hidden> wrote:
>
> On 22 May 2014, at 11:07, Gerriet M. Denkmann <email@hidden> wrote:
>
>>
>> This works:
>> NSString *fragment = ....
>> NSString *absString = [ @"https://translate.google.com/#" stringByAppendingString: fragment ];
>> NSURL *url = [ [ NSURL alloc ] initWithString: absString ];
>>
>> But I would like to use something like this:
>> NSURL *url = [ [ NSURL alloc ] initWithScheme: @"https" host: @"translate.google.com" fragment: fragment ];
>>
>> There is a method to get a fragment from an NSURL, but I cannot find anything to *set* or append a fragment.
>>
>> What am I missing?
>
> NSURLComponents.
>
Thanks a lot!
Gerriet.
_______________________________________________
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