From 6e0360deea114e91a89b6dc47d4386384d07c1ba Mon Sep 17 00:00:00 2001 From: oscarfung Date: Wed, 29 Apr 2015 17:06:13 +0800 Subject: [PATCH] Fix an issue that the alert will disappear when a keyboard is presented in iOS 8 (landscpe) --- CustomIOSAlertView/CustomIOSAlertView/View/CustomIOSAlertView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CustomIOSAlertView/CustomIOSAlertView/View/CustomIOSAlertView.m b/CustomIOSAlertView/CustomIOSAlertView/View/CustomIOSAlertView.m index 3684ff1..da0988e 100644 --- a/CustomIOSAlertView/CustomIOSAlertView/View/CustomIOSAlertView.m +++ b/CustomIOSAlertView/CustomIOSAlertView/View/CustomIOSAlertView.m @@ -416,7 +416,7 @@ - (void)keyboardWillShow: (NSNotification *)notification CGSize keyboardSize = [[[notification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue].size; UIInterfaceOrientation interfaceOrientation = [[UIApplication sharedApplication] statusBarOrientation]; - if (UIInterfaceOrientationIsLandscape(interfaceOrientation)) { + if (UIInterfaceOrientationIsLandscape(interfaceOrientation) && NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1) { CGFloat tmp = keyboardSize.height; keyboardSize.height = keyboardSize.width; keyboardSize.width = tmp;