class UIViewController

Public Instance Methods

<<(view_controller) click to toggle source

`alias << push` won't work. it doesn't “respect” subclasses overriding the `push` method.

# File lib/ios/sugarcube-ui/uiviewcontroller.rb, line 10
def <<(view_controller)
  push view_controller
end
dismiss_modal(options={}, &block) click to toggle source
# File lib/ios/sugarcube-modal/modal.rb, line 56
def dismiss_modal(options={}, &block)
  options = options.merge(target: self)
  SugarCube::Modal.dismiss_modal(options, &block)
end
pop() click to toggle source
# File lib/ios/sugarcube-ui/uiviewcontroller.rb, line 14
def pop
  to_pop = self.childViewControllers[-1]
  if to_pop
    to_pop.removeFromParentViewController
  end
end
present_modal(view_ctlr, options={}, &block) click to toggle source
# File lib/ios/sugarcube-modal/modal.rb, line 46
def present_modal(view_ctlr, options={}, &block)
  options = options.merge(target: self)
  SugarCube::Modal.present_modal(view_ctlr, options, &block)
end
present_modal_in_nav(view_ctlr, options={}, &block) click to toggle source
# File lib/ios/sugarcube-modal/modal.rb, line 51
def present_modal_in_nav(view_ctlr, options={}, &block)
  options = options.merge(target: self)
  SugarCube::Modal.present_modal_in_nav(view_ctlr, options, &block)
end
push(view_controller) click to toggle source
# File lib/ios/sugarcube-ui/uiviewcontroller.rb, line 3
def push(view_controller)
  self.addChildViewController(view_controller)
  self
end
to_s() click to toggle source
Calls superclass method
# File lib/ios/sugarcube-to_s/uiviewcontroller.rb, line 3
def to_s
  ret = super
  if self.presentingViewController
    ret += " presented by #{self.presentingViewController.to_s}"
  end
  ret
end