XTRouter 1.2.1

XTRouter 1.2.1

Maintained by akateason.



 
Depends on:
XTBase>= 0
XTFMDB>= 0
 

XTRouter 1.2.1

  • By
  • teason

XTRouter

Example

To run the example project, clone the repo, and run directory.

pic

Requirements

iOS 10.0 or later

Installation

XTRouter is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "XTRouter"

Useage

base on XTFMDB . you should config a DB when App did Launched .

Register router from Class/Xib/Storyboard

[XTRouter registVCFromClass:@"OneViewController"];
[XTRouter registVCFromXib:@"TwoViewController"];
[XTRouter registVCFromStoryboard:@"ThreeViewController" storyboardName:@"Main"];

Jump to any VC

[XTRouter jumpVC:@"OneViewController"
           param:@"{'a':'something blablabla'}"
             way:(XTRouterSkipWayPush)
     viewDidLoad:^{
     // do sth...
}];

Get the param

 id jsonStr = self.xt_param_jsonStr ;  // get JsonStr
 Model *m = [Model yy_modelWithJson:json];  // jsonStr to Model
...

中文说明

Author

teason, [email protected]

License

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