FCRouter 0.1.7

FCRouter 0.1.7

fuckManMark 维护。



FCRouter 0.1.7

  • 通过
  • ForC

FCRouter

iOS(object-c/swift) 的 URL 路由器。异步注册映射关系

启发于

HHRouter

ABRouter

Routable iOS

安装

cocoapods

pod 'FCRouter', '~> 0.1.2'
#import <FCRouter/FCRouter.h>

gitsubmodule

$ git submodule add https://github.com/Heqiao1025/FCRouter

Usage

启动

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

特性

URL查询参数

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

URL变量路径

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

注册处理

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

注册Plist映射

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

测试

详细内容见FCRouterTests.m

联系

许可证