Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Last active December 25, 2015 20:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeabdullah/7034158 to your computer and use it in GitHub Desktop.
Save mikeabdullah/7034158 to your computer and use it in GitHub Desktop.
-hostURL
// A single slash takes us back to the host's root directory,
// discarding any components after the path.
// Then make absolute so callers don't have to worry about any
// side-effects of working with relative URL objects.
return [[NSURL URLWithString:@"/" relativeToURL:url] absoluteURL];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment