code review

This commit is contained in:
Suresh, Kamlesh 2019-02-14 16:01:35 -05:00
parent b0e6d30500
commit 90310adfea
3 changed files with 5 additions and 6 deletions

View File

@ -326,7 +326,7 @@
- (BOOL)isOverridingRightButton { - (BOOL)isOverridingRightButton {
if ([self.loadObject.pageJSON dict:@"supportLink"]) { if ([self.loadObject.pageJSON dict:@"rightPanelButtonMap"]) {
[[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:[self.loadObject.pageJSON dict:@"supportLink"] [[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:[self.loadObject.pageJSON dict:@"supportLink"]
additionalData:nil additionalData:nil
delegate:self]; delegate:self];

View File

@ -24,7 +24,10 @@ NS_ASSUME_NONNULL_BEGIN
// Called when the back button is pressed. Overwrite for special functionality. // Called when the back button is pressed. Overwrite for special functionality.
- (void)backButtonPressed; - (void)backButtonPressed;
// View Controller can override this method and do custom action instead of opening the right panel
- (BOOL)isOverridingRightButton; - (BOOL)isOverridingRightButton;
// View Controller can override this method and do custom action instead of opening the left panel
- (BOOL)isOverridingLeftButton; - (BOOL)isOverridingLeftButton;
@end @end

View File

@ -152,17 +152,14 @@ CGFloat const PanelAnimationDuration = 0.2;
} }
if (self.mainViewLeading.constant < .1) { if (self.mainViewLeading.constant < .1) {
// Hide the keyboard // Hide the keyboard
[self.navigationController.topViewController.view endEditing:YES]; [viewController.view endEditing:YES];
// Show // Show
[self showLeftPanelAnimated:YES]; [self showLeftPanelAnimated:YES];
} else { } else {
// Hide // Hide
[self hideLeftPanelIfNeededAnimated:YES]; [self hideLeftPanelIfNeededAnimated:YES];
} }
}]; }];
} }
@ -191,7 +188,6 @@ CGFloat const PanelAnimationDuration = 0.2;
if (self.mainViewTrailing.constant < .1) { if (self.mainViewTrailing.constant < .1) {
// Hide the keyboard // Hide the keyboard
[viewController.view endEditing:YES]; [viewController.view endEditing:YES];
// Show // Show
[self showRightPanelAnimated:YES]; [self showRightPanelAnimated:YES];
} else { } else {