ZZRouter
ZZRouter copied to clipboard
You can configure jump types, redirection logic, and other trivial logic with ZZRouter
ZZRouter
Example
You can run the project directly,Open the sarfri in the simulator or iphone of the project, enter url: 1.zzrouter://productdetail 2.zzrouter://orderlist?orderid=xxx 3.zzrouter://category 4.zzrouter://homepage
Requirements
Installation
ZZRouter is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ZZRouter"
Usage
After you import ZZRouter's pod, you need to do the following:
1.Redirect logic and logic realization of jump mode: new different class implements the ZZRouterJumpTypeProtocol (jump type), ZZRouterRedirectProtocol (redirect logic), ZZRouterSequentialIndependenceProtocol (Logic that independent of the main process )
- Create the plist file for the method configuration, as follows:

- Create the plist file for the URL configuration, as follows:

- Call the method of registering two plist files in the didFinishLaunchingWithOptions method of the AppDelegate class
[ZZRouterHelper registMethodListName:@"RouterMethod" urlListName:@"UrlList"];
5.Configure scheme in URL type

- Remote URL specification:
1.Scheme is the scheme configured inside URL type
2.Host is description of the page function description
3.Parameters after ‘?’
4.Stitching parameters use ‘&’
5.Scheme, host, params are lowercase and conform to the standard URL specification
Example:zzrouter://orderlist?orderid=23245&type=3
Author
张苏亚, [email protected]
License
ZZRouter is available under the MIT license. See the LICENSE file for more info.