Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 42 lines (31 sloc) 1.739 kb
f3d43b6 @soffes The Great Rename
soffes authored
1 //
2 // NSURL+SSToolkitAdditions.h
3 // SSToolkit
4 //
5 // Created by Sam Soffes on 4/27/10.
e8c3ce3 @soffes Updated comments and renamed SSDrawingMacros to SSDrawingUtilities
soffes authored
6 // Copyright 2010-2011 Sam Soffes. All rights reserved.
f3d43b6 @soffes The Great Rename
soffes authored
7 //
8
072f882 @soffes More documentation. #24 #25
soffes authored
9 /**
10 Provides extensions to `NSURL` for various common tasks.
11 */
f3d43b6 @soffes The Great Rename
soffes authored
12 @interface NSURL (SSToolkitAdditions)
13
f63bf11 @soffes More documentation
soffes authored
14 /**
c0fc5c3 @soffes Added +[NSURL URLWithFormat:]
soffes authored
15 Creates and returns an NSURL object initialized with a provided a format string as a template into which the remaining
16 argument values are substituted.
17
18 The string with which to initialize the NSURL object must be a URL that conforms to RFC 2396. This method parses
19 URLString according to RFCs 1738 and 1808. This method expects URLString to contain any necessary percent escape codes,
20 which are `:`, `/`, `%`, `#`, `;`, and `@`. Note that `%` escapes are translated via UTF-8.
21
22 @param format A format string. See "[Formatting String Objects](http://developer.apple.com/library/IOS/#documentation/Cocoa/Conceptual/Strings/Articles/FormatStrings.html)"
23 for examples of how to use this method, and "[String Format Specifiers](http://developer.apple.com/library/IOS/#documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265-SW1)"
24 for a list of format specifiers. This value must not be `nil`.
25
26 @param ... A comma-separated list of arguments to substitute into format.
27
28 @return An NSURL object initialized with URLString. If the string was malformed, returns nil.
29
30 @exception NSInvalidArgumentException Thrown if `format` is `nil`.
31 */
32 + (id)URLWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
33
34 /**
f63bf11 @soffes More documentation
soffes authored
35 Returns a new dictionary that contains a dictionary for the receivers query string.
36
37 @return A new dictionary that contains a dictionary for the form encoded string.
38 */
f3d43b6 @soffes The Great Rename
soffes authored
39 - (NSDictionary *)queryDictionary;
40
41 @end
Something went wrong with that request. Please try again.