Merge branch 'master' into version-0.7

This commit is contained in:
Jamon Holmgren
2013-06-06 07:52:21 -07:00
4 changed files with 16 additions and 6 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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?