mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-31 01:35:41 +08:00
Merge branch 'master' into version-0.7
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
module ProMotion
|
||||
class NavigationController < UINavigationController
|
||||
def shouldAutorotate
|
||||
visibleViewController.shouldAutorotate
|
||||
end
|
||||
end
|
||||
class NavigationController < UINavigationController
|
||||
def shouldAutorotate
|
||||
visibleViewController.shouldAutorotate
|
||||
end
|
||||
|
||||
def supportedInterfaceOrientations
|
||||
visibleViewController.supportedInterfaceOrientations
|
||||
end
|
||||
|
||||
def preferredInterfaceOrientationForPresentation
|
||||
visibleViewController.preferredInterfaceOrientationForPresentation
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,6 +16,7 @@ module ProMotion
|
||||
|
||||
# Workaround for now. Will display a NoMethodError, but ignore.
|
||||
super rescue true
|
||||
PM.logger.info "You can ignore the NoMethodError -- this is a RubyMotion bug that should be fixed soon."
|
||||
end
|
||||
|
||||
def applicationWillTerminate(application)
|
||||
|
||||
@@ -33,7 +33,7 @@ module ProMotion
|
||||
|
||||
# Usage: PM.logger.log("ERROR", "message here", :red)
|
||||
def log(label, message_text, color)
|
||||
return if RUBYMOTION_ENV == "test"
|
||||
return if defined?(RUBYMOTION_ENV) && RUBYMOTION_ENV == "test"
|
||||
color = COLORS[color] || COLORS[:default]
|
||||
puts color[0] + NAME + "[#{label}] #{message_text}" + color[1]
|
||||
end
|
||||
|
||||
@@ -50,6 +50,7 @@ module ProMotion
|
||||
|
||||
def close_screen(args = {})
|
||||
args ||= {}
|
||||
args = { sender: args } unless args.is_a?(Hash)
|
||||
args[:animated] ||= true
|
||||
|
||||
if self.modal?
|
||||
|
||||
Reference in New Issue
Block a user