Skip to content

Instantly share code, notes, and snippets.

@danielphillips
Created April 30, 2013 16:53
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 danielphillips/5490060 to your computer and use it in GitHub Desktop.
Save danielphillips/5490060 to your computer and use it in GitHub Desktop.
Show off all of an NSURL
NSDictionary *urlStuff = @{
@"absoluteString" : URL.absoluteString ? URL.absoluteString : @"nil",
@"relativeString" : URL.relativeString ? URL.relativeString : @"nil",
@"scheme" : URL.scheme ? URL.scheme : @"nil",
@"resourceSpecifier" : URL.resourceSpecifier ? URL.resourceSpecifier : @"nil",
@"host" : URL.host ? URL.host : @"nil",
@"port" : URL.port ? URL.port : @"nil",
@"user" : URL.user ? URL.user : @"nil",
@"password" : URL.password ? URL.password : @"nil",
@"path" : URL.path ? URL.path : @"nil",
@"fragment" : URL.fragment ? URL.fragment : @"nil",
@"parameterString" : URL.parameterString ? URL.parameterString : @"nil",
@"query" : URL.query ? URL.query : @"nil",
@"relativePath" : URL.relativePath ? URL.relativePath : @"nil"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment