Added hide_nav_bar to screen init options per issue #471

This commit is contained in:
Jamon Holmgren
2014-09-05 14:41:38 -07:00
parent daf5b1b144
commit bb42cc668c
2 changed files with 3 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ module ProMotion
nav
end
self.navigationController.toolbarHidden = !args[:toolbar] unless args[:toolbar].nil?
self.navigationController.setNavigationBarHidden(args[:hide_nav_bar], animated: false) unless args[:hide_nav_bar].nil?
end
private

View File

@@ -123,13 +123,14 @@ describe "screen helpers" do
end
it "should apply properties when opening a new screen" do
new_screen = @screen.send(:set_up_screen_for_open, BasicScreen, { title: 'Some Title', modal: true, hide_tab_bar: true, nav_bar: true })
new_screen = @screen.send(:set_up_screen_for_open, BasicScreen, { title: 'Some Title', modal: true, hide_tab_bar: true, nav_bar: true, hide_nav_bar: true })
new_screen.parent_screen.should == @screen
new_screen.title.should == 'Some Title'
new_screen.modal?.should == true
new_screen.hidesBottomBarWhenPushed.should == true
new_screen.nav_bar?.should == true
new_screen.navigationController.isNavigationBarHidden.should == true
end
it "should present the navigationController when showing a modal screen" do