NKNavigationController

From NimbleKit

Jump to: navigation, search

[edit] Overview

NKNavigationController class allows to make navigation in application

[edit] Method List

- setTitle(title)

   Set navigation controller title for current page.

- setImage(imageName)

   Set navigation controller image for current page.

- hide()

   Hides navigation bar.

- show()

   Shows navigation bar if it was hidden.

- addNavigationItem(title, callback)

   adds a button to the right side of navigation controller.
   Parameters:
   title - a string title to appear on button 
   callback - a string function name to be called when user pressed navigation item

- gotoPage(pageName)

   navigates to given page creating “back” navigation button to allow to go to the previous page you also allowed to pass GET parameters to ʻpageNameʼ, for example “page.html? id=35&name=me”
   Parameters:
   pageName - name of the page to navigate to

- setStyle(style)

   sets the style of navigation controller

- destroy()

   completely removes controller from page
   Parameters:
   style is one of two values available: “Default” and “Black” (not case sensitive).


[edit] Examples

   var navController = new NKNavigationController(); 
   navController.setTitle("Nimble"); 
   navController.gotoPage("navtutorial.html");
Personal tools