romaonthego/RESideMenu — pull request #16 by blork (2013-07-22 20:18:59+00:00)
Title: Refactored RESideMenu into a Custom Container View Controller

Apologies for the size of this PR, but it's quite a large refactoring. I understand if you're reluctant to merge as-is - let me know if you need me to do anything. Thanks for the library, btw! It's great!

These commits represent a significant refactoring to change RESideMenu into a Custom Container View Controller. Views are therefore no longer added directly to the window, but instead switched between using the RESideMenu as a parent with the methods addChildViewController: and removeFromParentViewController. I believe this is a more idiomatic way to accomplish the functionality and gives some additional benefits.

This allows the menu to respond to rotation callbacks and so addresses #13. To deal with landscape/portrait there are now 2 additional offset properties, which isn't very tidy, but was the best way I could think to do it.

As it's now a View Controller, I added some other tweaks to animate the status bar style (nice for light content/dark background to switch between lightContent & default) by setting openStatusBarStyle. This should also give a solution for #7.