Class: UIAlertController

Inherits:
Object
  • Object
show all
Defined in:
lib/ProMotion/XLForm/ui_alert_controller.rb

Instance Method Summary collapse

Instance Method Details

#shouldAutorotateObject



11
12
13
# File 'lib/ProMotion/XLForm/ui_alert_controller.rb', line 11

def shouldAutorotate
  true
end

#supportedInterfaceOrientationsObject

workaround for Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘UIAlertController:supportedInterfaceOrientations was invoked recursively!’



5
6
7
8
9
# File 'lib/ProMotion/XLForm/ui_alert_controller.rb', line 5

def supportedInterfaceOrientations
  orientation = UIApplication.sharedApplication.statusBarOrientation

  orientation == UIDeviceOrientationPortrait || orientation == UIDeviceOrientationPortraitUpsideDown ? UIInterfaceOrientationMaskPortrait : UIInterfaceOrientationMaskLandscape
end