Method: MotionPrime::ScreenOrientationsMixin#should_rotate

Defined in:
motion-prime/screens/_orientations_mixin.rb

#should_rotate(orientation) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'motion-prime/screens/_orientations_mixin.rb', line 3

def should_rotate(orientation)
  case orientation
  when UIInterfaceOrientationPortrait
    return supported_orientation?("UIInterfaceOrientationPortrait")
  when UIInterfaceOrientationLandscapeLeft
    return supported_orientation?("UIInterfaceOrientationLandscapeLeft")
  when UIInterfaceOrientationLandscapeRight
    return supported_orientation?("UIInterfaceOrientationLandscapeRight")
  when UIInterfaceOrientationPortraitUpsideDown
    return supported_orientation?("UIInterfaceOrientationPortraitUpsideDown")
  else
    false
  end
end