Allow non-PM view controllers to be opened in split view controllers

This commit is contained in:
Jamon Holmgren
2013-05-14 22:17:48 -07:00
parent 651231e456
commit 00450db205

View File

@@ -14,8 +14,10 @@ class SplitViewController < UISplitViewController
# set the button from the old detail screen to the new one
button = detail_screen.navigationItem.leftBarButtonItem
s.navigationItem.leftBarButtonItem = button
vc = s.respond_to?(:main_controller) ? s.main_controller : s
self.viewControllers = [self.viewControllers.first, s.main_controller]
self.viewControllers = [self.viewControllers.first, vc]
end
def screens=(s_array)
self.viewControllers = s_array