lib/ProMotion/screen/nav_bar_module.rb in ProMotion-2.0.0.rc3 vs lib/ProMotion/screen/nav_bar_module.rb in ProMotion-2.0.0.rc4
- old
+ new
@@ -42,10 +42,10 @@
alias_method :set_toolbar_button, :set_toolbar_items
def add_nav_bar(args = {})
self.navigationController ||= begin
self.first_screen = true if self.respond_to?(:first_screen=)
- nav = NavigationController.alloc.initWithRootViewController(self)
+ nav = (args[:nav_controller] || NavigationController).alloc.initWithRootViewController(self)
nav.setModalTransitionStyle(args[:transition_style]) if args[:transition_style]
nav.setModalPresentationStyle(args[:presentation_style]) if args[:presentation_style]
nav
end
self.navigationController.toolbarHidden = !args[:toolbar] unless args[:toolbar].nil?