From f4bf4c0b5a8cf5157e4199b12f12e95a2e36c968 Mon Sep 17 00:00:00 2001 From: panxi Date: Wed, 8 May 2019 11:03:14 -0400 Subject: [PATCH] update code based on Scott's comment --- MVMCoreUI/BaseControllers/MFViewController.m | 8 ++------ .../MVMCoreUITabBarPageControlViewController.m | 8 ++++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/MVMCoreUI/BaseControllers/MFViewController.m b/MVMCoreUI/BaseControllers/MFViewController.m index 5c599ca3..a9206b52 100644 --- a/MVMCoreUI/BaseControllers/MFViewController.m +++ b/MVMCoreUI/BaseControllers/MFViewController.m @@ -343,9 +343,7 @@ - (BOOL)isOverridingRightButton { NSDictionary *rightPanelLinkDict = [self.loadObject.pageJSON dict:@"rightPanelButtonLink"]; if (rightPanelLinkDict) { - [[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:rightPanelLinkDict - additionalData:nil - delegateObject:[self delegateObject]]; + [[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:rightPanelLinkDict additionalData:nil delegateObject:[self delegateObject]]; return YES; } else { return NO; @@ -355,9 +353,7 @@ - (BOOL)isOverridingLeftButton { NSDictionary *leftPanelLinkDict = [self.loadObject.pageJSON dict:@"leftPanelButtonLink"]; if (leftPanelLinkDict) { - [[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:leftPanelLinkDict - additionalData:nil - delegateObject:[self delegateObject]]; + [[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:leftPanelLinkDict additionalData:nil delegateObject:[self delegateObject]]; return YES; } else { return NO; diff --git a/MVMCoreUI/Containers/TabBarController/MVMCoreUITabBarPageControlViewController.m b/MVMCoreUI/Containers/TabBarController/MVMCoreUITabBarPageControlViewController.m index 5845a06a..1d8481d6 100644 --- a/MVMCoreUI/Containers/TabBarController/MVMCoreUITabBarPageControlViewController.m +++ b/MVMCoreUI/Containers/TabBarController/MVMCoreUITabBarPageControlViewController.m @@ -140,16 +140,16 @@ } - (BOOL)isOverridingLeftButton { - if ([self.viewController isKindOfClass:MFViewController.class]) { - return [(MFViewController *)self.viewController isOverridingLeftButton]; + if ([self.viewController respondsToSelector:@selector(isOverridingLeftButton)]) { + return [self.viewController performSelector:@selector(isOverridingLeftButton)]; } else { return [super isOverridingLeftButton]; } } - (BOOL)isOverridingRightButton { - if ([self.viewController isKindOfClass:MFViewController.class]) { - return [(MFViewController *)self.viewController isOverridingRightButton]; + if ([self.viewController respondsToSelector:@selector(isOverridingRightButton)]) { + return [self.viewController performSelector:@selector(isOverridingRightButton)]; } else { return [super isOverridingRightButton]; }