lib/ProMotion/screens/_screen_module.rb in ProMotion-0.7.4 vs lib/ProMotion/screens/_screen_module.rb in ProMotion-0.7.5
- old
+ new
@@ -65,13 +65,16 @@
def refresh_tab_bar_item
self.tabBarItem = create_tab_bar_item(self.tab_bar_item) if self.tab_bar_item
end
- def add_nav_bar
+ def add_nav_bar(args = {})
self.navigation_controller ||= begin
self.first_screen = true if self.respond_to?(:first_screen=)
- NavigationController.alloc.initWithRootViewController(self)
+ nav = NavigationController.alloc.initWithRootViewController(self)
+ nav.setModalTransitionStyle(args[:transition_style]) if args[:transition_style]
+ nav.setModalPresentationStyle(args[:presentation_style]) if args[:presentation_style]
+ nav
end
end
def set_nav_bar_right_button(title, args={})
args[:title] = title