UCRouterObjc 0.1.0

UCRouterObjc 0.1.0

Maintained by ‘RPGLiker’.



  • By
  • Link913

UCRouterObjc

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

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

pod 'UCRouterObjc'

How to use

参考Example中的例子

功能支持:

  • 1.本地跨组件无耦合调用,而且不是hard code,是通过协议来完成的.
  • 2.注册URL之后外部便可以通过URL来进行跳转.

使用步骤:

  • 1.设置导航协议, URL过滤协议在主工程中的代理

      [[UCRouter shared] setNavgationAndUrlFilter:[UCNavgationDelegate new]
                         	         filterDelegate:[UCURLFilterDelegate new]];
    
  • 2.抽取一个协议层,这个协议层各个模块可以去依赖他,协议的实现放在各自的模块里.注意:我们本地native的跨组件调用都应该通过协议的方式,而不是通过注册url! 注册和调用可以看一下ViewControllerUCModuleAProvider中的代码.

  • 3.Objc其实是有比较好的注册方案的,我们放在UCModuleAProvider load方法中,对他的自身进行注册.

Author

Link913, [email protected]

License

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