在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:lightory/HHRouter开源软件地址:https://github.com/lightory/HHRouter开源编程语言:Objective-C 97.4%开源软件介绍:HHRouterYet another URL Router for iOS. Clean, Fast & Flexible. Inspired by ABRouter & Routable iOS. UsageWarm UpMap URL patterns to viewController. Better in AppDelegate. [[HHRouter shared] map:@"/user/:userId/" toControllerClass:[UserViewController class]]; Exciting TimeGet viewController instance from URL. Params will be parsed automatically. UIViewController *viewController = [[HHRouter shared] matchController:@"/user/1/"]; XCTAssertEqualObjects([viewController class], [UserViewController class]);
XCTAssertEqualObjects(viewController.params[@"route"], @"/user/1/");
XCTAssertEqualObjects(viewController.params[@"userId"], @"1"); URL Query ParamsURL Query Params is also supported, which will make things VERY flexible. UIViewController *viewController = [[HHRouter shared] matchController:@"/user/1/?tabIndex=3"]; XCTAssertEqualObjects(viewController.params[@"tabIndex"], @"3"); One More ThingIf your app has defined some URL schemes, HHRouter will know. UIViewController *viewController = [[HHRouter shared] matchController:@"hhrouter://user/1/"]; XCTAssertEqualObjects([viewController class], [UserViewController class]); InstallationCocoaPodspod 'HHRouter', '~> 0.1.8' #import <HHRouter/HHRouter.h> If you're not able to use CocoaPods, please install HHRouter as a git submodule and add the files to your Xcode project. We're Hiring!http://pudding.cc/opportunity/ ContactWho use HHRouter?If you're building your applications using HHRouter, please let me know! (add your application name & App Store link here and pull reuqest this README. LicenseHHRouter is available under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论