From 1ae17f82fbdf3bc3976a2ae9867b9ea15af5e157 Mon Sep 17 00:00:00 2001 From: Paul Merlin Date: Mon, 3 Jun 2013 19:53:56 +0200 Subject: [PATCH 1/4] Fix if RUBYMOTION_ENV not defined again console.rb was fixed but not logger.rb See #98 --- lib/ProMotion/helpers/logger.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ProMotion/helpers/logger.rb b/lib/ProMotion/helpers/logger.rb index 58449e8..108dc67 100644 --- a/lib/ProMotion/helpers/logger.rb +++ b/lib/ProMotion/helpers/logger.rb @@ -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 From fca63ed1e506c0670760c9193c2d33739eae2758 Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Tue, 4 Jun 2013 17:07:44 -0400 Subject: [PATCH 2/4] Support iOS 6 force rotation. --- .../cocoatouch/NavigationController.rb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/ProMotion/cocoatouch/NavigationController.rb b/lib/ProMotion/cocoatouch/NavigationController.rb index e702a29..cb71fd3 100644 --- a/lib/ProMotion/cocoatouch/NavigationController.rb +++ b/lib/ProMotion/cocoatouch/NavigationController.rb @@ -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 From 8149ba6ce09e967aec1ff67b8a8b58052f5ab0e6 Mon Sep 17 00:00:00 2001 From: Jamon Holmgren Date: Tue, 4 Jun 2013 14:24:16 -0700 Subject: [PATCH 3/4] Added logger message about NoMethodError --- lib/ProMotion/delegate/delegate_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ProMotion/delegate/delegate_helper.rb b/lib/ProMotion/delegate/delegate_helper.rb index 97cb02b..ccb75fd 100644 --- a/lib/ProMotion/delegate/delegate_helper.rb +++ b/lib/ProMotion/delegate/delegate_helper.rb @@ -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) From c3a0ef066b81bd4192563d41c6862bc14a38cea7 Mon Sep 17 00:00:00 2001 From: Jamon Holmgren Date: Thu, 6 Jun 2013 07:51:43 -0700 Subject: [PATCH 4/4] Fixed crash when closing a screen directly from a bar button action. --- lib/ProMotion/screen_helpers/screen_navigation.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ProMotion/screen_helpers/screen_navigation.rb b/lib/ProMotion/screen_helpers/screen_navigation.rb index 65fe30c..7756b8f 100644 --- a/lib/ProMotion/screen_helpers/screen_navigation.rb +++ b/lib/ProMotion/screen_helpers/screen_navigation.rb @@ -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?