Skip to content

Commit

Permalink
README.
Browse files Browse the repository at this point in the history
  • Loading branch information
lightory committed Mar 18, 2014
1 parent 21625ab commit 9d4317f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
11 changes: 0 additions & 11 deletions HHRouterExample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,11 @@

#import "AppDelegate.h"
#import "HHRouter.h"
#import "UserViewController.h"
#import "StoryViewController.h"
#import "StoryListViewController.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//NSString *url = @"huohua://user/:userId/?a=bc&c=d";
NSString *url = @"/user/:userId/?a=bc&c=d";
NSLog(@"%@", url.pathComponents);

[[HHRouter shared] map:@"/user/:userId/" toControllerClass:[UserViewController class]];
[[HHRouter shared] map:@"/story/:storyId/" toControllerClass:[StoryViewController class]];
[[HHRouter shared] map:@"/user/:userId/story/" toControllerClass:[StoryListViewController class]];

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
HHRouter
=====
Yet another URL Router for iOS. Clean, Fast & Powerful.

## Usage


## Installation
### [CocoaPods](http://cocoapods.org/)

```ruby
pod 'HHRouter', :git => 'https://github.com/Huohua/HHRouter.git', :commit => '21625ab064ad456d5c49c4e31b564cd628457023'
```

```objective-c
#import <HHRouter/HHRouter.h>
```

If you're not able to use CocoaPods, please install HHRouter as a [git submodule](http://schacon.github.com/git/user-manual.html#submodules) and add the files to your Xcode project.

## Contact
- [lightory@gmail.com](mailto:lightory@gmail.com)
- [http://twitter.com/lightory/](http://twitter.com/lightory/)

## License
HHRouter is available under the [MIT license](https://github.com/Huohua/HHRouter/blob/master/LICENSE).

0 comments on commit 9d4317f

Please sign in to comment.