Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

contextViewWindowHeight is incorrect on iOS8 landscape #521

Closed
fenlandersoftware opened this issue Oct 1, 2014 · 4 comments
Closed

contextViewWindowHeight is incorrect on iOS8 landscape #521

fenlandersoftware opened this issue Oct 1, 2014 · 4 comments

Comments

@fenlandersoftware
Copy link

in : - (void)jsq_handlePanGestureRecognizer:(UIPanGestureRecognizer *)pan

you have

//  system keyboard is added to a new UIWindow, need to operate in window coordinates
//  also, keyboard always slides from bottom of screen, not the bottom of a view
CGFloat contextViewWindowHeight = CGRectGetHeight(self.contextView.window.frame);

    if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
        contextViewWindowHeight = CGRectGetWidth(self.contextView.window.frame);
    }

however ios8 returns the correct height in the first place meaning you then replace it with the width causing a mess.

simple fix i did :

//  system keyboard is added to a new UIWindow, need to operate in window coordinates
//  also, keyboard always slides from bottom of screen, not the bottom of a view
CGFloat contextViewWindowHeight = CGRectGetHeight(self.contextView.window.frame);

float iOSVersion = [[UIDevice currentDevice].systemVersion floatValue];
if (iOSVersion >= 7.0f && iOSVersion < 7.1f)
{
    if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation)) {
        contextViewWindowHeight = CGRectGetWidth(self.contextView.window.frame);
    }
}
@jessesquires
Copy link
Owner

thanks @fenlandersoftware !

@fenlandersoftware
Copy link
Author

No problem, did lots of testing on ios6/ios7 & io8 and it should actually be
if (iOSVersion < 8.0f)

Basically they finally fixed that bug, causing bugs and issues all over the place as people had worked around it - had to do this in about 20 places over my app (just once in your controller)

@wdcurry
Copy link

wdcurry commented Oct 2, 2014

for what its' worth, the act of using the stock iMessage texting tool is now fraught with minor glitches in presentation as well.. just last night i spent many wasted moments trying to view images on a conversation. Keep on having to hard close the app over and over to see the new images.. And many apps that include a chat component seem to suffer as well

@jessesquires
Copy link
Owner

fixed 7ef5b4b

@jessesquires jessesquires added this to the Release 6.0 milestone Oct 11, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants