Git Product home page Git Product logo

jkrouter's Introduction

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, [email protected]

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
}

jkrouter's People

Contributors

xindizhiyin2014 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.