Sha256: ca0216707fb1d97e5640e73c8d6187df0c15af7018b17b7d718f4a58dbfb5a5b
Contents?: true
Size: 698 Bytes
Versions: 1
Compression:
Stored size: 698 Bytes
Contents
class UIViewController def push(view_controller) self.addChildViewController(view_controller) self end alias << push end class UINavigationController def push(view_controller) self.pushViewController(view_controller, animated: true) self end alias << push def pop(to_view=nil) if to_view self.popToViewController(to_view, animated: true) else self.popViewControllerAnimated(true) end end end class UITabBarController def push(view_controller) view_controllers = [] + self.viewControllers view_controllers << view_controller self.setViewControllers(view_controllers, animated: true) self end alias << push end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sugarcube-0.11 | lib/sugarcube/uiviewcontroller.rb |