jkr

JKRouter

this is a tool to help you to handle the push or pop between Viewcontrollers with your specified URL

Showing:

Popularity

Downloads/wk

0

GitHub Stars

48

Maintenance

Last Commit

1yr ago

Contributors

4

Package

Dependencies

0

License

MIT

Categories

Readme

JKRouter

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

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

pod "JKRouter"

Author

HHL110120, 929097264@qq.com

QQ Contact group

if you use QQ you can use this Qrcode to contact with us

License

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

guide

you can use the pod with the steps

config JKRouter

 [JKRouter configWithRouterFiles:@[@"modules.json",@"modules123.json"]];

configRootViewController

do not use TabBarViewController

JKViewController *vc = [JKViewController new];
self.window.rootViewController = vc;

if you use TabBarViewController

step1

self.rootTabBarController = [[RootTabbarViewController alloc] init];

UINavigationController *naVC = [[UINavigationController alloc] initWithRootViewController: self.rootTabBarController];
self.window.rootViewController = naVC;

step2 override the viewWillAppear of tabBarViewController

- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];

}

use viewController className to open the specified ViewController

 [JKRouter open:@"JKAViewController"];

use the scheme defined by yourself such as "jkpp"

step1

in JKRouterExtension+Jack.m file

+ (NSArray *)urlSchemes{

return @[@"http",@"https",@"jkpp"];
}

step2

 [JKRouter URLOpen:@"jkpp://jackApp:10001"];
 [JKRouter URLOpen:@"jkpp://jackApp:10002?testContent=Hi, I'm Jack"];
 [JKRouter URLOpen:@"jkpp://jackApp:10004/abc/mn/qq"];

use special transform animation

step1

in the target ViewController

- (RouterTransformVCStyle)jkRouterTransformStyle{
return RouterTransformVCStyleOther;
}

step2

config the animation in the function

- (void)jkRouterSpecialTransformWithNaVC:(UINavigationController *)naVC{
UIViewController *vc = naVC.topViewController;
vc.navigationController.delegate = self;

[naVC pushViewController:self animated:YES];
}

use access judge

if your app pages have access judgement please follow the next step in the target viewController

+ (BOOL)validateTheAccessToOpen{
//with the judment code
return YES;
}

+ (void)handleNoAccessToOpen{

//do the action if has no access
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100