toursprung/TSMessages — pull request #183 by vidhyadharan-Mohanram (2014-09-15 09:59:00+00:00)
Title: Fix for iOS 8.0 Landscape issue.

Narrowed down the issue to the following lines of code in fadeInCurrentNotification

CGSize statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;

The statusBarFrame.size returned in iOS 8 is different from the size value returned in iOS 7
statusBarSize = (width=20, height=1024) - iOS 7.0
statusBarSize = (width=1024, height=20) - iOS 8.0

Looks like apple is taking into consideration the device orientation in iOS 8.0 when returning the statusBarFrame value.

Fix:

Replaced the following code

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

with the following

CGSize statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
verticalOffset += statusBarSize.height;
return;
#endif

BOOL isPortrait = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]);
CGFloat offset = isPortrait ? statusBarSize.height : statusBarSize.width;
verticalOffset += offset;