TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jun 2017 |
Maintained by aelam.
To run the example project, clone the repo, and run pod install
from the Example directory first.
MSAppModuleKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MSAppModuleKit"
Ryan Wang, [email protected]
MSAppModuleKit is available under the MIT license. See the LICENSE file for more info.
For example: WebApp
Column | Name |
---|---|
Module | MSAppModuleWebApp |
Setting | MSAppSettingsWebApp |
RepoName | MSAppModuleWebApp |
Use pod lib create
Ref
Create Module with CocoaPods
[MSActiveControllerFinder setFinder:[CustomFinder new]];
Set it when app launch[MSActiveControllerFinder finder]
, You can get the a Finder,If you just don't implement it by yourself, [MSActiveControllerFinder finder]
will give you a TopViewController which is based on a UITabBarController+UINavigationControllers structure[MSActiveControllerFinder finder].resetStatus();
(implement by yourself). Usually You can close your sliderController if neededid<OneOfYouModuleSettings> settings = [appModuleManager appModuleWithClass:[YourModuleClass class]].moduleSettings;
NSString *productId = settings.productId;
// ...
- (void)moduleRegisterRoutes:(JLRoutes *)route {
#if USE_TRADE_FLAG
[route addRoute:@"trade" priority:0 handler:^BOOL(NSDictionary *parameters) {
[MSActiveControllerFinder finder].resetStatus();
NSString *stockCode = parameters[@"stockCode"];
NSString *tradeType = parameters[@"tradeType"];
UINavigationController *navController = [MSActiveControllerFinder finder].activeNavigationController();
[navController pushToTradeStockCode:[stockCode integerValue] withTradeType:[tradeType integerValue]];
return YES;
}];
#else
NSLog(@"模拟器为实现买卖股票");
#endif
}
- (void)moduleUnregisterRoutes:(JLRoutes *)route {
[route removeRoute:@"trade"]
}
|PageName |ModuleName | App-URL | Web-URL | pageId | |------ | ---- | ----- |--- | ---- | ----- | |Community| Community | community | | | |Web| WebApp | web | | |