Class: UIViewController
- Inherits:
-
Object
show all
- Defined in:
- lib/sugarcube/modal.rb,
lib/sugarcube/uiviewcontroller.rb,
lib/sugarcube/to_s/uiviewcontroller.rb
Instance Method Summary
collapse
Instance Method Details
#<<(view_controller) ⇒ Object
alias << push
won't work. it doesn't "respect" subclasses overriding the
push
method.
11
12
13
|
# File 'lib/sugarcube/uiviewcontroller.rb', line 11
def <<(view_controller)
push view_controller
end
|
#dismiss_modal(view_ctlr, options = {}, &block) ⇒ Object
38
39
40
41
|
# File 'lib/sugarcube/modal.rb', line 38
def dismiss_modal(view_ctlr, options={}, &block)
options = options.merge(target: self)
super(view_ctlr, options, &block)
end
|
#present_modal(view_ctlr, options = {}, &block) ⇒ Object
28
29
30
31
|
# File 'lib/sugarcube/modal.rb', line 28
def present_modal(view_ctlr, options={}, &block)
options = options.merge(target: self)
super(view_ctlr, options, &block)
end
|
#present_modal_in_nav(view_ctlr, options = {}, &block) ⇒ Object
33
34
35
36
|
# File 'lib/sugarcube/modal.rb', line 33
def present_modal_in_nav(view_ctlr, options={}, &block)
options = options.merge(target: self)
super(view_ctlr, options, &block)
end
|
#push(view_controller) ⇒ Object
3
4
5
6
7
|
# File 'lib/sugarcube/uiviewcontroller.rb', line 3
def push(view_controller)
self.addChildViewController(view_controller)
view_controller.didMoveToParentViewController(self)
self
end
|
3
4
5
6
7
8
9
|
# File 'lib/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
|