TTURLMap Class Reference

Inheritance diagram for TTURLMap:
NSObject

List of all members.

Public Member Functions

(void) - from:toObject:
 Adds a URL pattern which will perform a selector on an object when loaded.
(void) - from:toObject:selector:
(void) - from:toViewController:
 Adds a URL pattern which will create and present a view controller when loaded.
(void) - from:toViewController:selector:
(void) - from:toViewController:transition:
(void) - from:parent:toViewController:selector:transition:
(void) - from:toSharedViewController:
 Adds a URL pattern which will create and present a share view controller when loaded.
(void) - from:toSharedViewController:selector:
(void) - from:parent:toSharedViewController:
(void) - from:parent:toSharedViewController:selector:
(void) - from:toModalViewController:
 Adds a URL pattern which will create and present a modal view controller when loaded.
(void) - from:toModalViewController:selector:
(void) - from:toModalViewController:transition:
(void) - from:parent:toModalViewController:selector:transition:
(void) - from:toPopoverViewController:
(void) - from:toPopoverViewController:selector:
(void) - from:toURL:
 Adds a mapping from a class to a generated URL.
(void) - from:name:toURL:
 Adds a mapping from a class and a special name to a generated URL.
(void) - setObject:forURL:
 Adds a direct mapping from a literal URL to an object.
(void) - removeURL:
 Removes all objects and patterns mapped to a URL.
(void) - removeObject:
 Removes all URLs bound to an object.
(void) - removeObjectForURL:
 Removes objects bound literally to the URL.
(void) - removeAllObjects
 Removes all bound objects;.
(id) - objectForURL:
 Gets or creates the object with a pattern that matches the URL.
(id) - objectForURL:query:
(id) - objectForURL:query:pattern:
(id) - dispatchURL:toTarget:query:
(TTNavigationMode) - navigationModeForURL:
 Tests if there is a pattern that matches the URL and if so returns its navigation mode.
(NSInteger) - transitionForURL:
 Tests if there is a pattern that matches the URL and if so returns its transition.
(BOOL) - isSchemeSupported:
 Returns YES if there is a registered pattern with the URL scheme.
(BOOL) - isAppURL:
 Returns YES if the URL is destined for an external app.
(NSString *) - URLForObject:
 Gets a URL that has been mapped to the object.
(NSString *) - URLForObject:withName:

Protected Attributes

NSMutableDictionary_objectMappings
NSMutableArray_objectPatterns
NSMutableArray_fragmentPatterns
NSMutableDictionary_stringPatterns
NSMutableDictionary_schemes
TTURLNavigatorPattern_defaultObjectPattern
TTURLNavigatorPattern_hashPattern
BOOL _invalidPatterns

Member Function Documentation

- (void) from: (NSString*)  URL
toSharedViewController: (id)  target 

Adds a URL pattern which will create and present a share view controller when loaded.

Controllers created with the "share" mode, meaning that it will be created once and re-used until it is destroyed.

- (void) from: (NSString*)  URL
toViewController: (id)  target 

Adds a URL pattern which will create and present a view controller when loaded.

The selector will be called on the view controller after is created, and arguments from the URL will be extracted using the pattern and passed to the selector.

target can be either a Class which is a subclass of UIViewController, or an object which implements a method that returns a UIViewController instance. If you use an object, the selector will be called with arguments extracted from the URL, and the view controller that you return will be the one that is presented.

- (id) objectForURL: (NSString*)  URL  

Gets or creates the object with a pattern that matches the URL.

Object mappings are checked first, and if no object is bound to the URL then pattern matching is used to create a new object.

- (void) setObject: (id)  object
forURL: (NSString*)  URL 

Adds a direct mapping from a literal URL to an object.

The URL must not be a pattern - it must be the a literal URL. All requests to open this URL will return the object bound to it, rather than going through the pattern matching process to create a new object.

Mapped objects are not retained. You are responsible for removing the mapping when the object is destroyed, or risk crashes.


The documentation for this class was generated from the following files:
  • Three20UINavigator/Headers/TTURLMap.h
  • Three20UINavigator/Sources/TTURLMap.m
blog comments powered by Disqus