Latest 0.1.1
Homepage https://github.com/v39lfy/LFRouter
License MIT
Platforms ios 8.0
Authors

Build Status
Version
Carthage compatible
License

Description

block化的路由组件,支持url路由到指定界面。

  1. 可以使用path传参,使用【:变量名】来捕获参数。例如:http://app.pvp.run/:userId/profile (捕获参数方式参考了HHRouter)。
  2. 可以使用query传参。例如http://app.pvp.run/:userId/profile?sort=1。
  3. 可以使用app原生来传参,参考Demo中的
    [Router open:RouterPush params:@{@"name":@"AAA"}];
  4. 当三种传参方式重名时,优先使用的参数为path > query > app
  5. 对应的Controller,需要外界传入参数时,需要声明LFRouterParamsRequired或者LFRouterParamsOption,如果声明为Required,则框架会自动检查该参数是否存在。不存在则有错误回调,或控制台打印警告。如不声明这个属性是参数,则框架不会自动填充。
  6. 所有的路由模块的跳转逻辑由对应的block处理,可以自定义跳转逻辑。参考demo。

想法未实现

  1. 插件系统,比如自定义一个登录插件。当路由框架启动该插件之后。插件会过滤出需要登录的路径,当对这些路径进行跳转时。如果未登录会打开登录页。或者密码隐私全局保护等。
  2. 路由优先级和生命周期管理

    Example

To run the example project, clone the repo,open Example/LFRouterExample

Requirements

Installation

CocoaPods

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

target 'MyApp' do
pod 'LFRouter', '~> 0.1'
end

Carthage

github "v39lfy/LFRouter"

Author

lify, [email protected]

License

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

Latest podspec

{
    "name": "LFRouter",
    "version": "0.1.1",
    "summary": "LFRouter u7528u4e8euff1a\n\t1.u89e3u8026ViewControlleru4e4bu95f4u7684u8c03u7528 \n\t2.u7edfu4e00h5u548cviewu4e4bu95f4u7684u8df3u8f6cu903bu8f91 \n\t3.u63d2u4ef6u5316viewControlleru8fdbu5165u4e4bu524du7684u903bu8f91uff08u6bd4u5982uff1au67d0u4e9bu754cu9762u9700u8981u767bu5f55u7b49u7b49uff09",
    "description": "LFRouteru7684u4e3bu8981u529fu80fdu6709:n1.u6dfbu52a0u8defu7531u8df3u8f6cu3002uff08u652fu6301url pathu4f20u53c2uff0cqueryu4f20u53c2uff0cu672cu5730u624bu52a8u4f20u53c2uff09n2.u7f3au5c11u53c2u6570u81eau52a8u68c0u6d4bn2.u6dfbu52a0u754cu9762u7684u524du7f6eu903bu8f91uff0cu6bd4u5982:n  1)u67d0u4e2au7528u6237u8be6u60c5u9875u9762u9700u8981u4e00u4e2aUserModelu6765u5c55u793auff0cu672cu5730u6253u5f00u4e2au4ebau4e2du5fc3u754cu9762u90fdu4f1au7531u4e0au4e00u4e2au754cu9762u4f20u8fc7u6765u4e00u4e2aUserModel.n    u73b0u5728u9700u8981h5u6253u5f00appu6765u8df3u8f6cu7528u6237u8be6u60c5uff0cu53eau4f20u8fc7u6765u4e00u4e2auserid,u4f60u53efu4ee5u5728u8fd9u4e2au8defu7531u4e0bu524du7f6eu8bf7u6c42u7f51u7edcuff1bn3.u7edfu4e00u7ba1u7406controlleru751fu547du5468u671fuff0cu6240u6709u7684u8df3u8f6cu90fdu4ee5u961fu5217u4efbu52a1u7684u65b9u5f0fu4fddu5b58uff0cu4f60u53efu4ee5u8bbeu7f6eu89c4u5219u53cau4f18u5148u7ea7u3002",
    "homepage": "https://github.com/v39lfy/LFRouter",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "v39lfy": "[email protected]"
    },
    "source": {
        "git": "https://github.com/v39lfy/LFRouter.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "LFRouter/Classes/**/*",
    "public_header_files": "LFRouter/Classes/**/*.h"
}

Pin It on Pinterest

Share This