ajerez / AJNotificationView

Notice component for iOS (UNMAINTAINED CODE)
MIT License
303 stars 41 forks source link

landscape orientation on iPad #8

Closed iOSDevil closed 11 years ago

iOSDevil commented 11 years ago

the demo project when run in landscape mode causes the notification view to not display correctly.. it flies from right to left and goes off screen

ajerez commented 11 years ago

Hi, I can't trigger the bug you are explaining. Can you give me more data? Thanks

jackysze commented 11 years ago

Hi, the library does not handle screen rotation properly. You may replicate the issue easily by creating a demo application that supports multiple orientations and do the following steps.

  1. start the application in portrait mode
  2. rotate the application to landscape
  3. show AJNotificationView in UIWindow

You will see the notification view flies from left to right. I've looked into the code and seems there are problems in calculating offsets in different orientations.

ajerez commented 11 years ago

Sorry for taking so long to fix this issue but lately I don't have much time for working in my repos.

The problem was that in landscape orientation height and width are swapped, because the status bar frame is in the screen's coordinate space. When this occurs the height of the status bar is 1024 and the notification not display correctly. This problem is fixed in the last commit

sjmn commented 10 years ago

still happening (or happening again in iOS 7.1??)