No description or website provided.
Objective-C Shell Ruby
Latest commit e4695b0 Jan 11, 2017 Neo demo bug fix~
Permalink
Failed to load latest commit information.
Example demo bug fix~ Jan 11, 2017
WLRRoute 0.0.6 Dec 29, 2016
.swift-version 0.0.1 Dec 18, 2016
.travis.yml Initial commit Dec 18, 2016
LICENSE Initial commit Dec 18, 2016
README.md readme Dec 22, 2016
WLRRoute.podspec 0.0.6 Dec 29, 2016
_Pods.xcodeproj Initial commit Dec 18, 2016

README.md

WLRRoute

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, 394570610@qq.com

License

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