Sha256: ed80ccfbb30f5fe5da9a77294824483d8c13edc5e4ae30b50423ee72381c7f94
Contents?: true
Size: 1.58 KB
Versions: 13
Compression:
Stored size: 1.58 KB
Contents
// // CPDViewController.m // PROJECT // // Created by PROJECT_OWNER on TODAYS_DATE. // Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. // #import "CPDViewController.h" #import <YKRouterComponent/YKRouterComponentHeader.h> #import <YKModuleServiceComponent/YKModuleServiceComponentHeader.h> #import <PROJECT/CPDPROJECTServiceProtocol.h> #import <PROJECT/CPDPROJECTRouterDefine.h> @interface CPDViewController () @end @implementation CPDViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.navigationItem.title = [NSString stringWithFormat:@"%@",@"PROJECT Demo"]; } - (IBAction)routerEvent:(id)sender { NSLog(@"这里调用模块的路由"); [self yk_openUrl:kDemoRouterString parameter:@{}]; } - (IBAction)serviceEvent:(id)sender { NSLog(@"这里调用模块的服务"); NSError *err; __kindof Class<CPDPROJECTServiceProtocol> cls =YKModuleServiceWithProtocol(@protocol(CPDPROJECTServiceProtocol), &err); if (!err) { NSObject <CPDPROJECTServiceProtocol>* obj = [[cls alloc] init]; [obj replaceThisMethod]; } } - (void)yk_openUrl:(NSString *)url parameter:(NSDictionary *__nullable)parameters { YKRouterUrlRequest* request = [YKRouterUrlRequest instanceWithBuilder:^(YKRouterUrlRequest * _Nonnull builder) { builder.url = url; builder.parameter = parameters; }]; return [[YKRouterComponent shareInstance] ykOpenUrl:request complete:^(YKRouterUrlResponse * _Nonnull urlResponse) { }]; } @end
Version data entries
13 entries across 13 versions & 1 rubygems