Method: ProMotion::ScreenModule#supported_orientations

Defined in:
lib/ProMotion/screens/_screen_module.rb

#supported_orientationsObject



177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/ProMotion/screens/_screen_module.rb', line 177

def supported_orientations
  orientations = 0
  NSBundle.mainBundle.infoDictionary["UISupportedInterfaceOrientations"].each do |ori|
    case ori
    when "UIInterfaceOrientationPortrait"
      orientations |= UIInterfaceOrientationMaskPortrait
    when "UIInterfaceOrientationLandscapeLeft"
      orientations |= UIInterfaceOrientationMaskLandscapeLeft
    when "UIInterfaceOrientationLandscapeRight"
      orientations |= UIInterfaceOrientationMaskLandscapeRight
    when "UIInterfaceOrientationPortraitUpsideDown"
      orientations |= UIInterfaceOrientationMaskPortraitUpsideDown
    end
  end
  orientations
end