GithubHelp home page GithubHelp logo

ramrouter's Introduction

RAMRouter

RAMRouter :使用URL来定位页面及页面导航。

特性

  • 去中心化的URL配置方式
  • 高性能的URL匹配算法,支持通配符和正则表达式
  • 支持跨应用或web view和native请求的响应,http链接升级成native页面

用法

###页面配置 配置页面,注册URL到Router

+ (RAMRouterConfig *)configureRouter {
    RAM_EXPORT();
    RAMRouterConfig *config = [[RAMRouterConfig alloc] initWithUrlPath:[self urlPath]];
    return config;
}
+ (NSString*)urlPath {
    return @"router://viewcontroller1";
}

###接口使用

RAMRouterParam *param = [[RAMRouterParam alloc] init];
param.url = @"router://viewcontroller2";
param.launchMode = RAMControllerLaunchModePushNavigation;
param.params = @{@"paramKey":@"viewcontroller1"};
[[RAMRouter sharedRouter] route:param];

安装

CocoaPods

  1. pod 'RAMRouter' , :git=>'https://github.com/RamboQiu/RAMRouter.git'
  2. pod installpod update
  3. #import "RAMRouter.h"

注意podfile 不允许使用 use_frameworks! 会导致路由读取mach-o的getsectbynamefromheader和getsectdatafromheader方法失效

系统要求

该项目最低支持iOS 8.0Xcode 8.0

许可证

RAMRouter,详情见LICENSE文件。

ramrouter's People

Contributors

ramboqiu avatar

Stargazers

 avatar  avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.