lib/ProMotion/screen_helpers/screen_navigation.rb in ProMotion-0.6.5 vs lib/ProMotion/screen_helpers/screen_navigation.rb in ProMotion-0.7.0

- old
+ new

@@ -38,18 +38,22 @@ def open_root_screen(screen) app_delegate.open_root_screen(screen) end + def open_modal(screen, args = {}) + open screen, args.merge({ modal: true }) + end + def app_delegate UIApplication.sharedApplication.delegate end def close_screen(args = {}) args ||= {} args[:animated] ||= true - if self.is_modal? + if self.modal? close_modal_screen args elsif self.navigation_controller close_nav_screen args send_on_return(args) # TODO: this would be better implemented in a callback or view_did_disappear.