Sha256: 74120ec36072e6502328a0bc4e50a69a49abd0ad10570a7f519c23852f7c926a
Contents?: true
Size: 742 Bytes
Versions: 16
Compression:
Stored size: 742 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 class UITabBarController def <<(view_controller) view_controllers = [] + self.viewControllers view_controllers << view_controller self.setViewControllers(view_controllers, animated: true) self end end
Version data entries
16 entries across 16 versions & 1 rubygems