terryworona/TWMessageBarManager — pull request #29 by DanielKrofchick (2014-03-27 18:03:26+00:00)
Title: Added rotation support by placing the messages in the rootViewController...

... of their own window. Added rotation notification to resize messages on rotation

These changes add rotation support. For notifications to rotate properly (without resorting to complicated transforms) they need to be a subview of a window's rootViewController. However adding it to the sharedApplication's keyWindow rootViewController causes problems with notifications appearing behind modal controllers that are presented. The best solution is to create another window on top, and add the notifications to it's rootViewController. The last trick is to handle touches for the message views, but pass all other touches to the window below.

This has been tested on iOS 6.1 and 7.1. And works with all rotations on the iPad. I haven't tested rotations on the iPhone, but I don't see why it wouldn't work there as well.

I left the keyWindow naming, although it does now return a view.