Reuse the split screen button on the new detail screen.

This commit is contained in:
Stephan Toggweiler
2013-05-02 10:18:41 +02:00
parent 0e84f9fb48
commit d9963c8269

View File

@@ -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)