To run the example project, clone the repo, and run pod install
from the Example directory first.
在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"}];
LJJRouter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'LJJRouter'
liusui, 952923202@qq.com
LJJRouter is available under the MIT license. See the LICENSE file for more info.