The NavBar API supports a native navigation bar for the iPhone.
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.. |
NavBar.create :title => "Navigation bar", :left => { :action => :back, :label => "Back"}, :right => { :action => url_for(:action => :help), :label => "Help"}
Removes a navigation bar from the iPhone.
NavBar.remove