creates a native Cocoa Touch progress view. Control is created on the top layer of page, so if there are html elements on the given coordinates control will overlap them.
init(x, y, width)
initializes progressbar att coordinates x (left coordinate) and y (bottom coordinate) with a horizontal width.
show()
shows initialized progressbar, does nothing if already shown.
hide()
hides initialized progressbar, does nothing if already hidden.
setPosition(value)
sets position of the slider. Takes a value between 0-100(%).
Initialization of the progressbar. Setting initial value to "0" creates a "empty" progressbar.
var progress = new NKProgressBar();
progress.init(70, 70, 100);
progress.setPosition(0);
progress.show();
When the function "progressStep" is called, the progressbar moves to the value (val) that is passed to the function.
function progressStep(val) {
progress.setPosition(val);
}
See the example source code for a more detailed implementation.