mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-01-12 09:33:43 +08:00
23 lines
806 B
Ruby
23 lines
806 B
Ruby
class AppDelegate
|
|
attr_reader :window
|
|
|
|
def application(application, didFinishLaunchingWithOptions:launchOptions)
|
|
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
|
|
|
|
# This is just here to test that you can call rmq in AppDelegate
|
|
o = rmq
|
|
|
|
main_controller = MainController.alloc.initWithNibName(nil, bundle: nil)
|
|
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(main_controller)
|
|
|
|
@window.makeKeyAndVisible
|
|
true
|
|
end
|
|
|
|
def application(application, willChangeStatusBarOrientation: new_orientation, duration: duration)
|
|
# Manually set RMQ's orientation before the device is actually oriented
|
|
# So that we can do stuff like style views before the rotation begins
|
|
rmq.device.orientation = new_orientation
|
|
end
|
|
end
|