From 64f193dff5bec1f1d2ac653e7e4029f0c68f1c0d Mon Sep 17 00:00:00 2001 From: Mark Rickert Date: Sat, 12 Oct 2013 00:16:39 -0400 Subject: [PATCH] Allow split screens to have a different navigation title and popover controller button title. --- lib/ProMotion/containers/split_screen.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/ProMotion/containers/split_screen.rb b/lib/ProMotion/containers/split_screen.rb index f15c094..9d349a6 100644 --- a/lib/ProMotion/containers/split_screen.rb +++ b/lib/ProMotion/containers/split_screen.rb @@ -21,6 +21,11 @@ module ProMotion if args.has_key?(:icon) or args.has_key?(:title) split.tabBarItem = create_tab_bar_item(args) end + + if args.has_key?(:button_title) + @button_title = args[:button_title] + end + split end @@ -33,7 +38,7 @@ module ProMotion # UISplitViewControllerDelegate methods def splitViewController(svc, willHideViewController: vc, withBarButtonItem: button, forPopoverController: pc) - button.title = vc.title + button.title = @button_title || vc.title svc.detail_screen.navigationItem.leftBarButtonItem = button; end