Sha256: 13408ed078402b3bffb3084556968e3fd79c93e912488087d4cbe4f0436f7c8e

Contents?: true

Size: 517 Bytes

Versions: 11

Compression:

Stored size: 517 Bytes

Contents

class UINavigationController

  def push(view_controller)
    self.pushViewController(view_controller, animated: true)
    self
  end

  def <<(view_controller)
    self.pushViewController(view_controller, animated: true)
    self
  end

  def pop(to_view=nil)
    return self.!(to_view) if to_view

    self.popViewControllerAnimated(true)
  end

  def !(to_view=nil)
    if to_view
      self.popToViewController(to_view, animated: true)
    else
      self.popToRootViewControllerAnimated(true)
    end
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sugarcube-0.7 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.6.1 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.6 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.5 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.4.2 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.4.1 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.4 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.3.2 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.3.1 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.3.0 lib/sugarcube/uiviewcontroller.rb
sugarcube-0.2.5 lib/sugarcube/uiviewcontroller.rb