Class: SplitViewController

Inherits:
UISplitViewController
  • Object
show all
Defined in:
lib/ProMotion/cocoatouch/SplitViewController.rb

Instance Method Summary collapse

Instance Method Details

#detail_screenObject



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
# File 'lib/ProMotion/cocoatouch/SplitViewController.rb', line 13

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.pm_main_controller]
end

#master_screenObject



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.pm_main_controller, self.viewControllers.last]
end

#screens=(s_array) ⇒ Object



20
21
22
# File 'lib/ProMotion/cocoatouch/SplitViewController.rb', line 20

def screens=(s_array)
  self.viewControllers = s_array
end