TSMessages icon indicating copy to clipboard operation
TSMessages copied to clipboard

Does not work correctly on iPad since iOS 8

Open ghost opened this issue 11 years ago • 4 comments

The message window seems to drop from the top of the screen down to "below" the bottom of the screen and then come back, instead of just going down nicely from the top of the screen and then up again. That appears on the master view controller of the splitViewController in iOS 8.

ghost avatar Dec 21 '14 08:12 ghost

Has anyone found a work around for this? Im using the latest TSMessages version, and I'm seeing this too. all other devices seem to work fine.

zakdillon avatar Jun 04 '15 17:06 zakdillon

Same issue here!

ghost avatar Jul 17 '15 06:07 ghost

I think the issue has already been fixed but didn't yet make it to the cocoapods. For people who need a quick fix

In TSMessage.m change

void (^addStatusBarHeightToVerticalOffset)() = ^void() {
        BOOL isPortrait = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]);
        CGSize statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
        CGFloat offset = offset = isPortrait ? statusBarSize.height : statusBarSize.width;
        verticalOffset += offset;
    };

to

void (^addStatusBarHeightToVerticalOffset)() = ^void() {
        BOOL isPortrait = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]);
        CGSize statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
        CGFloat offset = 0;

        if (TS_SYSTEM_VERSION_LESS_THAN(@"8.0")) {
            offset = isPortrait ? statusBarSize.height : statusBarSize.width;
        } else {
            offset = statusBarSize.height;
        }

        verticalOffset += offset;
    };

petripartanen avatar Oct 19 '15 10:10 petripartanen

@petripartanen thank you !

ulaserdegor avatar May 09 '16 13:05 ulaserdegor