mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 15:52:40 +00:00
IPad issue when sliding the keyboard to hide it
This commit is contained in:
parent
53504e58c1
commit
3d2a3b159e
1 changed files with 9 additions and 1 deletions
|
@ -577,10 +577,18 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
|||
|
||||
CGFloat screenHeight = 0;
|
||||
CGSize screenSize = [[UIScreen mainScreen] bounds].size;
|
||||
|
||||
UIViewController* rootViewController = self;
|
||||
|
||||
// get the root view controller to extract the application size
|
||||
while (rootViewController.parentViewController && ![rootViewController isKindOfClass:[UISplitViewController class]]) {
|
||||
rootViewController = rootViewController.parentViewController;
|
||||
}
|
||||
|
||||
// IOS 6 ?
|
||||
// IOS 7 always gives the screen size in portrait
|
||||
// IOS 8 takes care about the orientation
|
||||
if (self.view.frame.size.width > self.view.frame.size.height) {
|
||||
if (rootViewController.view.frame.size.width > rootViewController.view.frame.size.height) {
|
||||
screenHeight = MIN(screenSize.width, screenSize.height);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue