Latest 0.5.3
Homepage https://github.com/Wondermall/Vespucci
License MIT
Platforms ios 8.0, requires ARC
Dependencies JLRoutes
Authors

CI Status
Version
License
Platform

Usage

VSPNavigationManager *manager = [[VSPNavigationManager alloc] initWithURLScheme:@"my-app"];

// Register the route matching URL my-app://home/posts/123xyz
[manager registerNavigationForRoute:@"/home/posts/:post_id" handler:^VSPNavigationNode *(NSDictionary *parameters) {
    VSPNavigationNode *root = [VSPNavigationNode rootNodeForParameters:parameters nodeIds:RootNodeId, NewsFeedNodeId, PostNodeId, nil];
    root.leaf.viewController = [PostViewController postViewControllerWithPostId:parameters[@"post_id"]];
    return root;
}];

// Define presentation and dismissal rules
[self addRuleForHostNodeId:NewsFeedNodeId childNodeId:PostNodeId mountBlock:^RACSignal *(VSPNavigationNode *parent, VSPNavigationNode *child) {
    return [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) {
        [parent.viewController presentViewController:child.viewController animated:animated completion:^{
            [subscriber sendCompleted];
        }];
        return nil;
    }];
} unmounBlock:^RACSignal *(VSPNavigationNode *parent, VSPNavigationNode *child) {
    return [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) {
        [child.viewController dismissViewControllerAnimated:animated completion:^(BOOL finished){
            [subscriber sendCompleted];
        }]
        return nil;
    }];
}];

Please see the example project for details.

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

Requirements

Installation

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

pod "Vespucci"

Author

Sash Zats, [email protected]

License

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

Latest podspec

{
    "name": "Vespucci",
    "version": "0.5.3",
    "summary": "Navigation microframework",
    "description": "Routing made simple. Not only for UINavigationController.nn1. Register a route.n2. Explain how to present a view controller.n3. Explain how to dismiss it.nnThat's it. Framework takes care of all the transition permutations!",
    "homepage": "https://github.com/Wondermall/Vespucci",
    "license": "MIT",
    "authors": {
        "Sash Zats": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Wondermall/Vespucci.git",
        "tag": "0.5.3"
    },
    "social_media_url": "https://twitter.com/zats",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Sources/**/*",
    "dependencies": {
        "JLRoutes": [
            "~> 1.6"
        ]
    }
}

Pin It on Pinterest

Share This