Skip to content
No description, website, or topics provided.
Objective-C Shell Ruby
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Example
QIURouter
.gitignore
.swift-version
.travis.yml
LICENSE
QIURouter.podspec
README.md
_Pods.xcodeproj

README.md

QIURouter

CI Status Version License Platform

Example

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

AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {      
    [QIURouter map:@"second" toController:[QIUSecondViewController class]];
}

Your ViewController

@interface QIUSecondViewController ()
@end
    
@implementation QIUSecondViewController

//+ (instancetype)loadFromStoryboard
//{
//    
//}

// or

+ (instancetype)loadFromStoryboard:(NSDictionary *)parms
{
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    QIUSecondViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"QIUSecondViewController"];
    viewController.label.text = parms[@"text"];
    return viewController;
}
    
@end

Then, you can use

[QIURouter open:@"second" params:@{@"text": @"Param from ViewControlelr",
                                       @"viewControllerTitle": @"titleFromFirstViewController"} withViewController:self];

Requirements

iOS 8.0

Xcode 8

Installation

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

pod "QIURouter"

Author

QiuFeng, qfviolethill@163.com

License

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

You can’t perform that action at this time.