Skip to content

zhangsuya/ZZRouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZZRouter

license pod platform aboutme

中文介绍和用法

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 )

  1. Create the plist file for the method configuration, as follows:

  1. Create the plist file for the URL configuration, as follows:

  1. 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

  1. 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

张苏亚, suya.zhang@feiniu.com

License

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

About

You can configure jump types, redirection logic, and other trivial logic with ZZRouter

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published