From d9963c8269c2dc4a3f25589c76723309666daebe Mon Sep 17 00:00:00 2001 From: Stephan Toggweiler Date: Thu, 2 May 2013 10:18:41 +0200 Subject: [PATCH] Reuse the split screen button on the new detail screen. --- lib/ProMotion/cocoatouch/SplitViewController.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ProMotion/cocoatouch/SplitViewController.rb b/lib/ProMotion/cocoatouch/SplitViewController.rb index 5983ddf..664984a 100644 --- a/lib/ProMotion/cocoatouch/SplitViewController.rb +++ b/lib/ProMotion/cocoatouch/SplitViewController.rb @@ -11,6 +11,10 @@ class SplitViewController < UISplitViewController self.viewControllers = [s.main_controller, self.viewControllers.last] end def detail_screen=(s) + # set the button from the old detail screen to the new one + button = detail_screen.navigationItem.leftBarButtonItem + s.navigationItem.leftBarButtonItem = button + self.viewControllers = [self.viewControllers.first, s.main_controller] end def screens=(s_array)