Latest 0.1.1
Homepage https://github.com/Neojoke/WLRRoute
License MIT
Platforms ios 7.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

WLRRoute is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "WLRRoute"

Architecture

RouteClassMap

中文介绍

WLRRoute是一个简单的iOS路由组件
详情请移步文章介绍:
移动端路由层设计
一步步构建iOS路由
本代码会随着大家的讨论逐步更新,喜欢的来个星✨~谢谢

Usage

self.router = [[WLRRouter alloc]init];
[self.router registerHandler:[[WLRSignHandler alloc]init] forRoute:@"/signin/:phone([0-9]+)"];
[self.router handleURL:[NSURL URLWithString:@"WLRDemo://com.wlrroute.demo/signin/13812345432"] primitiveParameters:nil targetCallBack:^(NSError *error, id responseObject) {
        NSLog(@"SiginCallBack");
    } withCompletionBlock:^(BOOL handled, NSError *error) {
        NSLog(@"SiginHandleCompletion");
    }];

[self.router registerHandler:[[WLRUserHandler alloc]init] forRoute:@"/user"];
[self.router handleURL:[NSURL URLWithString:@"WLRDemo://com.wlrroute.demo/user"] primitiveParameters:@{@"user":@"Neo~🙃🙃"} targetCallBack:^(NSError *error, id responseObject) {
        NSLog(@"UserCallBack");
    } withCompletionBlock:^(BOOL handled, NSError *error) {
        NSLog(@"UserHandleCompletion");
    }];

Author

Neo, [email protected]

License

WLRRoute is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "WLRRoute",
    "version": "0.1.1",
    "summary": "WLRRoute is a simple route,it can provide Url matching and custom handler~",
    "description": "It is used to show how to build a route system in iOS app, and I keep it simple and clear.WLRRoute provide url matching , primitive parameters transfer, target callback block , custom handler can overwrite  transitionWithRequest to navigate source to target.",
    "homepage": "https://github.com/Neojoke/WLRRoute",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Neo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Neojoke/WLRRoute.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "WLRRoute/Classes/**/*"
}

Pin It on Pinterest

Share This