From 4ab0c8fe58694bc326590d3ac98334fd4ac84488 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 9 Jan 2019 14:36:11 -0500 Subject: [PATCH] Landscape orientation. --- .../ViewControllers/OWSViewController.m | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/SignalMessaging/ViewControllers/OWSViewController.m b/SignalMessaging/ViewControllers/OWSViewController.m index 5bc88b39b..563156c58 100644 --- a/SignalMessaging/ViewControllers/OWSViewController.m +++ b/SignalMessaging/ViewControllers/OWSViewController.m @@ -115,35 +115,39 @@ NS_ASSUME_NONNULL_BEGIN - (void)keyboardWillShow:(NSNotification *)notification { - [self handleKeyboardNotification:notification]; + [self handleKeyboardNotificationBase:notification]; } - (void)keyboardDidShow:(NSNotification *)notification { - [self handleKeyboardNotification:notification]; + [self handleKeyboardNotificationBase:notification]; } - (void)keyboardWillHide:(NSNotification *)notification { - [self handleKeyboardNotification:notification]; + [self handleKeyboardNotificationBase:notification]; } - (void)keyboardDidHide:(NSNotification *)notification { - [self handleKeyboardNotification:notification]; + [self handleKeyboardNotificationBase:notification]; } - (void)keyboardWillChangeFrame:(NSNotification *)notification { - [self handleKeyboardNotification:notification]; + [self handleKeyboardNotificationBase:notification]; } - (void)keyboardDidChangeFrame:(NSNotification *)notification { - [self handleKeyboardNotification:notification]; + [self handleKeyboardNotificationBase:notification]; } -- (void)handleKeyboardNotification:(NSNotification *)notification +// We use the name `handleKeyboardNotificationBase` instead of +// `handleKeyboardNotification` to avoid accidentally +// calling similarly methods with that name in subclasses, +// e.g. ConversationViewController. +- (void)handleKeyboardNotificationBase:(NSNotification *)notification { OWSAssertIsOnMainThread();