Sha256: f7c479a3af7fddea26393b3c05d3166b728bd917dd5e118650eacfc4121e51fd

Contents?: true

Size: 770 Bytes

Versions: 11

Compression:

Stored size: 770 Bytes

Contents

class SplitViewController < UISplitViewController
  def master_screen
    s = self.viewControllers.first
    s.respond_to?(:visibleViewController) ? s.visibleViewController : s
  end
  def detail_screen
    s = self.viewControllers.last
    s.respond_to?(:visibleViewController) ? s.visibleViewController : s
  end
  def master_screen=(s)
    self.viewControllers = [s.pm_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.pm_main_controller]
  end
  def screens=(s_array)
    self.viewControllers = s_array
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ProMotion-0.7.8 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.7.6 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.7.5 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.7.4 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.7.3 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.7.2 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.7.1 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.7.0 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.6.5 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.6.4 lib/ProMotion/cocoatouch/SplitViewController.rb
ProMotion-0.6.3 lib/ProMotion/cocoatouch/SplitViewController.rb