Class Widget.NavBar

NavBar Widget.

a widget used for navigation between pages.

Inherits from:
* Core.Widget

Style Object:
* ???

Usage:

     dUI = require 'dmc_ui'
     widget = dUI.newNavBar()

Properties

.delegate () set/get delegate for item.

Methods

:pushNavItem (navItem, params) add Nav Item to navigation stack.
:popNavItemAnimated () pop Nav Item from navigation stack.

Class Constants

Widget.NavBar.EVENT NavBar event constant.
Widget.NavBar.BACK_BUTTON NavBar event constant for press on Back Button.


Properties

.delegate ()
set/get delegate for item.

Usage:

  • widget.delegate = <delegate object>
  • print( widget.delegate )

Methods

:pushNavItem (navItem, params)
add Nav Item to navigation stack. push a new Nav Item, furthering the navigation stack. this typically will animate the new view on the screen.

Parameters:

Usage:

    widget:pushNavItem( navItem, params )
:popNavItemAnimated ()
pop Nav Item from navigation stack. removes top-level Nav Item from navigation stack, animating the previous view on the screen.

Usage:

    widget:popNavItemAnimated()

Class Constants

Widget.NavBar.EVENT
NavBar event constant. used when setting up event listeners

Usage:

    widget:addEventListener( widget.EVENT, listener )
Widget.NavBar.BACK_BUTTON
NavBar event constant for press on Back Button. used inside of event handler

Usage:

     local function listener( event )
       local target = event.target -- the NavBar
       if event.type == target.BACK_BUTTON then
        -- handle event here
       end
     end
     widget:addEventListener( widget.EVENT, listener )
generated by LDoc 1.4.3 Last updated 2015-05-14 11:55:05