myell0w / MTStatusBarOverlay

A custom iOS status bar overlay seen in Apps like Reeder, Evernote and Google Mobile App
MIT License
1.92k stars 325 forks source link

Overlay positioning incorrect in landscape mode -- iOS 8 #88

Closed SquaredTiki closed 9 years ago

SquaredTiki commented 10 years ago

In iOS 8 when the device is rotated (from portrait to landscape for example) the positioning and width of the overlay does not change, rather it keeps the same width as in portrait mode. This results in the overlay being shifted across to the right, showing some of the status bar

brendand commented 10 years ago

Have you come up with a fix for this?

SquaredTiki commented 10 years ago

Not at present no. Will either work on a fix soon or move away from using MTStatusBarOverlay as it doesn't seem to be maintained as much anymore.

brendand commented 10 years ago

Yes, it seems like the author has abandoned it.

SquaredTiki commented 10 years ago

Submitted a pull request which should fix this, see #89. cc/ @brendand

rumbeck commented 10 years ago

You need to account for the native scale when using native bounds, such as:

[UIScreen mainScreen].nativeBounds.size.width / [UIScreen mainScreen].nativeScale. [UIScreen mainScreen].nativeBounds.size.height / [UIScreen mainScreen].nativeScale.

Otherwise, for iPads, while your location will be correct, your width won't be.

SquaredTiki commented 10 years ago

@rumbeck Good point, I shall update the pull request.

skumawat commented 8 years ago

Hello, When we display message on status bar using MTStatusbaroverlay class then message doesn't display properly in portrait & landscape mode on iOS 9 devices. Its working fine on iOS 8 or lower devices.