Class: SplitViewController
- Inherits:
-
UISplitViewController
- Object
- UISplitViewController
- SplitViewController
- Defined in:
- lib/ProMotion/cocoatouch/SplitViewController.rb
Instance Method Summary collapse
- #detail_screen ⇒ Object
- #detail_screen=(s) ⇒ Object
- #master_screen ⇒ Object
- #master_screen=(s) ⇒ Object
- #screens=(s_array) ⇒ Object
Instance Method Details
#detail_screen ⇒ Object
6 7 8 9 |
# File 'lib/ProMotion/cocoatouch/SplitViewController.rb', line 6 def detail_screen s = self.viewControllers.last s.respond_to?(:visibleViewController) ? s.visibleViewController : s end |
#detail_screen=(s) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/ProMotion/cocoatouch/SplitViewController.rb', line 13 def detail_screen=(s) # set the button from the old detail screen to the new one = detail_screen..leftBarButtonItem s..leftBarButtonItem = vc = s.respond_to?(:main_controller) ? s.main_controller : s self.viewControllers = [self.viewControllers.first, vc] end |
#master_screen ⇒ Object
2 3 4 5 |
# File 'lib/ProMotion/cocoatouch/SplitViewController.rb', line 2 def master_screen s = self.viewControllers.first s.respond_to?(:visibleViewController) ? s.visibleViewController : s end |
#master_screen=(s) ⇒ Object
10 11 12 |
# File 'lib/ProMotion/cocoatouch/SplitViewController.rb', line 10 def master_screen=(s) self.viewControllers = [s.main_controller, self.viewControllers.last] end |
#screens=(s_array) ⇒ Object
22 23 24 |
# File 'lib/ProMotion/cocoatouch/SplitViewController.rb', line 22 def screens=(s_array) self.viewControllers = s_array end |