Merge pull request #82 from clearsightstudio/version-0.6

Version 0.6 branch -- merge into master
This commit is contained in:
Jamon Holmgren
2013-05-18 20:09:37 -07:00
3 changed files with 20 additions and 3 deletions

View File

@@ -19,7 +19,11 @@ module ProMotion
[ master, detail ].map { |s| s.on_load if s.respond_to?(:on_load) }
split_screen_controller master, detail
split = split_screen_controller master, detail
if args.has_key?(:icon) or args.has_key?(:title)
split.tabBarItem = create_tab_bar_item(args)
end
split
end
def open_split_screen(master, detail, args={})
@@ -39,4 +43,4 @@ module ProMotion
svc.detail_screen.navigationItem.leftBarButtonItem = nil
end
end
end
end

0
resources/list.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 104 B

After

Width:  |  Height:  |  Size: 104 B

View File

@@ -6,7 +6,7 @@ describe "split screen in tab bar functionality" do
@master_screen = HomeScreen.new nav_bar: true
@detail_screen = BasicScreen.new nav_bar: true
@split_screen = @app.create_split_screen @master_screen, @detail_screen
@split_screen = @app.create_split_screen @master_screen, @detail_screen, icon: "list", title: "Spec"
@tab = @app.open_tab_bar @split_screen, HomeScreen, BasicScreen
end
@@ -49,5 +49,18 @@ describe "split screen in tab bar functionality" do
it "should set the tab bar first viewController to the split screen" do
@tab.viewControllers.first.should == @split_screen
end
it "should set the bar bar item for the split screen" do
@split_screen.tabBarItem.is_a?(UITabBarItem).should == true
end
it "should set the tab bar icon of the split screen" do
@split_screen.tabBarItem.image.is_a?(UIImage).should == true
end
it "should set the tab bar title of the split screen" do
@split_screen.tabBarItem.title.is_a?(String).should == true
@split_screen.tabBarItem.title.should == "Spec"
end
end