Skip to content

liusui/LJJRouter

Repository files navigation

LJJRouter

CI Status Version License Platform

Example

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

Useage

在App启动时需要第一个调用,实现下面的方法,为LJJRouter设置初始ViewController

+ (void)startupWithHomeViewController:(NSString *)viewControllerName

ViewController想要支持LJJRouter的跳转,需要实现LJJRouterViewControllerInstantiation协议中的方法instantiateViewController,提供ViewController的实例。 普通viewController初始化在.m文件里添加LJJRouterInitPage(), storyboard启动的viewController初始化是添加LJJRouterInitPageFromStoryboard(StoryboardName,StoryboardID), 初始化完成就可以进行跳转 比如LJJHomeViewController,跳转时可使用

[[LJJRouter shared] navigateTo:@"LJJHomeViewController" arguments:@{@"content":@"Hello"}]; 或者
[[LJJRouter shared] navigateTo:@"LJJHome" arguments:@{@"content":@"Hello"}];

Installation

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

pod 'LJJRouter'

Author

liusui, [email protected]

License

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