Provides convenience methods for working with Titanium UI objects.
Creates a Titanium UI object with the specified styles.
The following creates a new View object and assigns the "dialog" TSS class (defined elsewhere) to the view, and finally adds it to main window.
var view = $.UI.create("View", {
classes: 'dialog'
});
$.index.add(view);
Name of the Titanium object to create. This can either be the full class
name, such as Ti.UI.Button
, or the XML element, such as Button
.
Dictionary of styles to apply. opts
may also contain any additional properties you would like to apply directly the created Titanium object.