SDK Documentation & Reference.Documentation Pdf



NKToolBar


Overview

Class is used as an utility toolbar

init(y)

Initializes toolbar with vertical position ʻyʼ

show()

shows initialized toolbar

hide()

hides initialized toolbar

addButton(title, imageName, callback)

creates button on the toolbar

Parameters:
title - button title to be displayed (ignored if imageName specified)
imageName - the filename of bundled image to be displayed on button (discards title)
callback - javascript function name to be called when button pressed

insertButtonAtIndex(index, title, image, callback)

creates button on toolbar

Parameters:
index - index, used to specify button position, count starts from 1 title - button title to be displayed (ignored if imageName specified)
imageName - the filename of bundled image to be displayed on button (discards title)
callback - javascript function name to be called when button pressed

addDoneButton(title, callback)

creates blue button on toolbar, which has same style is used for "Done" buttons

addFlexibleSpace()

adds flexible space into toolbar, used to align buttons

setStyle(style)

sets the style of toolbar, possible values are: "black", "blacktranslucent", "default"

setTintColor(red, green, blue)

sets color for the toolbar, color components are values in range [0..255]

destroy()

removes and destroys toolbar and resources allocated for it.

removeButtonAtIndex(index)

removed button at specified index (starts at 0)