Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

NavBar API

The NavBar API supports a native navigation bar for the iPhone.

create

Creates a navigation bar for the iPhone.

NavBar.create(navbar-elements)

The navbar-elements parameter is a list of name/value pairs from the following list of navbar elements.

:title String. Title of the navigation bar.
:left Left button with :action and :label defined.
:right (optional) Right button with :action and :label defined.

The :left and :right buttons use the following parameters:

:action action to perform (click here for the menu-toolbar-tabbar actions), or url to open, when the button is pressed.
:label Label for the button..

Example call

NavBar.create :title => "Navigation bar",
          :left => {
            :action => :back, 
            :label => "Back"},
          :right => {
            :action => url_for(:action => :help), 
            :label => "Help"}

remove

Removes a navigation bar from the iPhone.

NavBar.remove
Back to Top