class UnderOs::UI::Navbar
Constants
- SYSTEM_BUTTONS
Attributes
_[R]
Public Class Methods
new(ui_navigation_controller)
click to toggle source
# File lib/under_os/ui/navbar.rb, line 4 def initialize(ui_navigation_controller) @_ = ui_navigation_controller end
Public Instance Methods
disable_swipes()
click to toggle source
# File lib/under_os/ui/navbar.rb, line 27 def disable_swipes @_.interactivePopGestureRecognizer.enabled = false end
enable_swipes()
click to toggle source
# File lib/under_os/ui/navbar.rb, line 31 def enable_swipes @_.interactivePopGestureRecognizer.enabled = true end
hide(animated=true)
click to toggle source
# File lib/under_os/ui/navbar.rb, line 11 def hide(animated=true) @_.setNavigationBarHidden(true, animated:animated) end
repaint(stylesheet)
click to toggle source
# File lib/under_os/ui/navbar.rb, line 8 def repaint(stylesheet) end
show(animated=true)
click to toggle source
# File lib/under_os/ui/navbar.rb, line 15 def show(animated=true) @_.setNavigationBarHidden(false, animated:animated) end
visible()
click to toggle source
# File lib/under_os/ui/navbar.rb, line 23 def visible !hidden end
Private Instance Methods
to_raw_uiview(view)
click to toggle source
# File lib/under_os/ui/navbar.rb, line 85 def to_raw_uiview(view) view = view.to_sym if view.is_a?(String) view = {view: Proc.new{}} if view.is_a?(Symbol) if view.is_a?(UnderOs::UI::View) view.addClass('navbar-item') view.repaint(UnderOs::App.history.current_page.stylesheet) view = view._ end view end