Class: ProMotion::SplitViewController
- Inherits:
-
UISplitViewController
- Object
- UISplitViewController
- ProMotion::SplitViewController
- Defined in:
- lib/ProMotion/cocoatouch/split_view_controller.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
8 9 10 11 |
# File 'lib/ProMotion/cocoatouch/split_view_controller.rb', line 8 def detail_screen s = self.viewControllers.last s.respond_to?(:visibleViewController) ? s.visibleViewController : s end |
#detail_screen=(s) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/ProMotion/cocoatouch/split_view_controller.rb', line 17 def detail_screen=(s) # set the button from the old detail screen to the new one = detail_screen..leftBarButtonItem s..leftBarButtonItem = self.viewControllers = [self.viewControllers.first, (s. || s)] end |
#master_screen ⇒ Object
3 4 5 6 |
# File 'lib/ProMotion/cocoatouch/split_view_controller.rb', line 3 def master_screen s = self.viewControllers.first s.respond_to?(:visibleViewController) ? s.visibleViewController : s end |
#master_screen=(s) ⇒ Object
13 14 15 |
# File 'lib/ProMotion/cocoatouch/split_view_controller.rb', line 13 def master_screen=(s) self.viewControllers = [ (s. || s), self.viewControllers.last] end |
#screens=(s_array) ⇒ Object
25 26 27 |
# File 'lib/ProMotion/cocoatouch/split_view_controller.rb', line 25 def screens=(s_array) self.viewControllers = s_array end |