* Provides convenience methods for working with Titanium UI objects.
5
*/
6
7
/**
8
* @method create
9
* Creates a Titanium UI object with the specified styles.
10
* #### Example
11
* The following creates a new {@link Titanium.UI.View View} object and assigns the "dialog"
12
* TSS class (defined elsewhere) to the view, and finally adds it to main window.
13
14
var view = $.UI.create("View", {
15
classes: 'dialog'
16
});
17
$.index.add(view);
18
* @param {String} apiName Name of the Titanium object to create. This can either be the full class
19
* name, such as `Ti.UI.Button`, or the XML element, such as `Button`.
20
* @param {AlloyStyleDict} opts Dictionary of styles to apply. `opts` may also contain any additional properties you would like to apply directly the created Titanium object.
21
* @return {Titanium.UI.View/Alloy.Controller}
22
* @since 1.2.0
23
*/
24
25
/**
26
* @class AlloyStyleDict
27
* @typestr Object
28
* @since 1.2.0
29
* @pseudo
30
* Simple JavaScript object of properties and TSS classes to apply to a Titanium UI object.
31
*
32
* All properties are optional.
33
*
34
* The `apiName` property is only specified with the `createStyle` method.
35
*
36
* In addition to the properties defined below, you can also specify properties related to the
37
* component.
38
*/
39
40
/**
41
* @property apiName
42
* @type String
43
* Name of the Titanium UI object. This can either be the full class name, such as
44
* `Ti.UI.Button`, or the XML element, such as `Button`.
45
*
46
* Specified only with {@link Alloy.Controller#method-createStyle createStyle}.
47
*/
48
49
/**
50
* @property classes
51
* @type Array<String>
52
* Array of TSS classes to apply to the Titanium UI object.
53
*/
54
55
/**
56
* @property id
57
* @type String
58
* TSS ID style to apply to the Titanium UI object.
59
*/
60
61
/**
62
* @class TrackedEventListener
63
* @typestr Object
64
* @since 1.7.0
65
* @pseudo
66
* A tracked event listener.
67
*/
68
69
/**
70
* @property handler
71
* @type Function
72
* Callback bound to the view's event.
73
*/
74
75
/**
76
* @property id
77
* @type String
78
* ID attribute of the view object. If the view object does not have an ID attribute,