/FCRouter

URL Router for iOS

Primary LanguageObjective-CMIT LicenseMIT

FCRouter

URL Router for iOS(object-c/swift). Async Register Mapping Relation

Inspired :

HHRouter

ABRouter

Routable iOS

Installation

pod 'FCRouter'
#import <FCRouter/FCRouter.h>
$ git submodule add https://github.com/Heqiao1025/FCRouter

Usage

Launching

- (void)regsiterUrl:(NSString *)url mapViewControllerClass:(Class)VCClass;
- (UIViewController *)matchViewControllerWithUrl:(NSString *)url;

Feature

URL Query Params

UIViewController *vc = [FCRouter.share matchViewControllerWithUrl:@"ForC://mine/setting/replacePassword?id=1002&author=ForC"]

URL variable path

UIViewController *vc = [FCRouter.share matchViewControllerWithUrl:@"ForC://mine/:userID/replacePassword"]

Register Handle

- (void)regsiterUrl:(NSString *)url mapHandle:(FCRouterHandle)handle

Register Plist Map

- (void)regsiterPlistPathForSource:(NSString *)source bundle:(NSBundle *)bundle;

Test

Detail in FCRouterTests.m

contact

LICENSE