To run the example project, clone the repo, and run pod install
from the Example directory first.
JKRouter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "JKRouter"
HHL110120, [email protected]
if you use QQ you can use this Qrcode to contact with us
JKRouter is available under the MIT license. See the LICENSE file for more info.
you can use the pod with the steps
[JKRouter configWithRouterFiles:@[@"modules.json",@"modules123.json"]];
JKViewController *vc = [JKViewController new];
self.window.rootViewController = vc;
self.rootTabBarController = [[RootTabbarViewController alloc] init];
UINavigationController *naVC = [[UINavigationController alloc] initWithRootViewController: self.rootTabBarController];
self.window.rootViewController = naVC;
- (void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
}
[JKRouter open:@"JKAViewController"];
in JKRouterExtension+Jack.m file
+ (NSArray *)urlSchemes{
return @[@"http",@"https",@"jkpp"];
}
[JKRouter URLOpen:@"jkpp://jackApp:10001"];
[JKRouter URLOpen:@"jkpp://jackApp:10002?testContent=Hi, I'm Jack"];
[JKRouter URLOpen:@"jkpp://jackApp:10004/abc/mn/qq"];
in the target ViewController
- (RouterTransformVCStyle)jkRouterTransformStyle{
return RouterTransformVCStyleOther;
}
config the animation in the function
- (void)jkRouterSpecialTransformWithNaVC:(UINavigationController *)naVC{
UIViewController *vc = naVC.topViewController;
vc.navigationController.delegate = self;
[naVC pushViewController:self animated:YES];
}
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
}