From bbe5b2c03eb3efecba6483ea729dbd4df1c11667 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 29 May 2019 10:24:16 +0800 Subject: [PATCH 1/4] Update UIKitSupport.md --- Doc/UIKitSupport.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Doc/UIKitSupport.md b/Doc/UIKitSupport.md index 8c5e105..0f4be1a 100644 --- a/Doc/UIKitSupport.md +++ b/Doc/UIKitSupport.md @@ -44,8 +44,12 @@ Controller作为EventBus的提供者,View和Controller都可以通过属性`ev ## FAQ -1. ChildViewController如何和ParentViewController通信? +ChildViewController如何和ParentViewController通信? -将ChildViewController的`isDispatcherProvider`属性设置为NO。 +将ChildViewController的`isDispatcherProvider`属性设置为NO。这样EventBus在寻找`eventDispatcher`的时候会忽略这个controller,从而找到parentController + +## 局限性 + +只有在响应链建立完成了才能分发事件,所以适合处理用户触摸产生,不适合其他逻辑场景。 From c11416c75f74ad9cc41ecacb2a44ec301a591690 Mon Sep 17 00:00:00 2001 From: LeoMobileDeveloper Date: Thu, 26 Sep 2019 23:28:34 +0800 Subject: [PATCH 2/4] close #15 --- Sources/Core/QTEventBusCollection.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/Core/QTEventBusCollection.m b/Sources/Core/QTEventBusCollection.m index b6b9943..74a4c6b 100644 --- a/Sources/Core/QTEventBusCollection.m +++ b/Sources/Core/QTEventBusCollection.m @@ -89,6 +89,7 @@ - (void)removeNodeForId:(NSString *)uniqueId{ node.previous = nil; previousNode.next = nextNode; nextNode.previous = previousNode; + [_registeredNodeTable removeObjectForKey:uniqueId]; } - (void)appendNode:(_QTEventBusLinkNode *)node{ From b4943fb1f1c63828e977d53f8e09bbedba7625d0 Mon Sep 17 00:00:00 2001 From: LeoMobileDeveloper Date: Thu, 26 Sep 2019 23:30:18 +0800 Subject: [PATCH 3/4] v0.4.1 --- QTEventBus.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QTEventBus.podspec b/QTEventBus.podspec index 5c67ee5..83416f3 100644 --- a/QTEventBus.podspec +++ b/QTEventBus.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'QTEventBus' - s.version = '0.4.0' + s.version = '0.4.1' s.summary = '优雅的处理全局事件' s.description = <<-DESC 优雅的处理全局事件,类型安全,支持同步/异步发送,同步/异步监听 From cb01489573a0e50c7be15d6fae4c2d6bf4c8f2d2 Mon Sep 17 00:00:00 2001 From: alexju Date: Tue, 23 Jun 2020 17:19:33 +0800 Subject: [PATCH 4/4] =?UTF-8?q?fix:appDidFinishLaunch=20=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Demo/Modules/PayService.m | 4 ++-- Demo/Modules/UserService.m | 4 ++-- Sources/AppModule/QTAppDelegate.m | 2 +- Sources/AppModule/QTAppModule.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Demo/Modules/PayService.m b/Demo/Modules/PayService.m index 216258d..257d5c2 100644 --- a/Demo/Modules/PayService.m +++ b/Demo/Modules/PayService.m @@ -21,8 +21,8 @@ @implementation PayService return [[PayService alloc] init]; } -- (void)appDidFinishLuanch:(QTAppDidLaunchEvent *)event{ - NSLog(@"PayService: appDidFinishLuanch"); +- (void)appDidFinishLaunch:(QTAppDidLaunchEvent *)event{ + NSLog(@"PayService: appDidFinishLaunch"); } @end diff --git a/Demo/Modules/UserService.m b/Demo/Modules/UserService.m index 9190421..42e4f90 100644 --- a/Demo/Modules/UserService.m +++ b/Demo/Modules/UserService.m @@ -36,8 +36,8 @@ - (void)registerEventObserver{ return [UserService shared]; } -- (void)appDidFinishLuanch:(QTAppDidLaunchEvent *)event{ - NSLog(@"UserService: appDidFinishLuanch"); +- (void)appDidFinishLaunch:(QTAppDidLaunchEvent *)event{ + NSLog(@"UserService: appDidFinishLaunch"); [[UserService shared] registerEventObserver]; } diff --git a/Sources/AppModule/QTAppDelegate.m b/Sources/AppModule/QTAppDelegate.m index 51d26dd..2fadf29 100644 --- a/Sources/AppModule/QTAppDelegate.m +++ b/Sources/AppModule/QTAppDelegate.m @@ -24,7 +24,7 @@ @implementation QTAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ QTAppDidLaunchEvent * event = [[QTAppDidLaunchEvent alloc] init]; event.launchOptions = launchOptions; - [self _sendEvent:event sel:@selector(appDidFinishLuanch:)]; + [self _sendEvent:event sel:@selector(appDidFinishLaunch:)]; QTAppAllModuleInitEvent * initEvent = [[QTAppAllModuleInitEvent alloc] init]; [self _sendEvent:initEvent sel:@selector(appAllModuleInit:)]; return YES; diff --git a/Sources/AppModule/QTAppModule.h b/Sources/AppModule/QTAppModule.h index 9aeca06..2719462 100644 --- a/Sources/AppModule/QTAppModule.h +++ b/Sources/AppModule/QTAppModule.h @@ -21,7 +21,7 @@ #pragma mark - 常用 /// 启动 -- (void)appDidFinishLuanch:(QTAppDidLaunchEvent *)event; +- (void)appDidFinishLaunch:(QTAppDidLaunchEvent *)event; /// App全部的模块已初始化 - (void)appAllModuleInit:(QTAppAllModuleInitEvent *)event;