Alekx Alekx - 2 years ago 71
Objective-C Question

Keep RubyMotion application from rotating

How can I stop a RubyMotion application from rotating?

I tried implementing:

def shouldAutorotateToInterfaceOrientation(interfaceOrientation)
UIInterfaceOrientationLandscapeRight == interfaceOrientation

but I want something that is application-wide, is there a method I can set in the
that will control this throughout the app?

Answer Source

You can find a good solution here:

iOS 6 apps - how to deal with iPhone 5 screen size?

If you'd like to make it more application-wide, I'd recommend creating a module you can include.

module Rotation
  # methods here

class MyViewController < UIViewController
  include Rotation
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download