Re: Creating Url with Fragment
Re: Creating Url with Fragment
- Subject: Re: Creating Url with Fragment
- From: Mike Abdullah <email@hidden>
- Date: Thu, 22 May 2014 11:25:31 +0100
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.
_______________________________________________
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