Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 144 lines (143 sloc) 3.23 kb
62834fa @baldrailers Adding base code
baldrailers authored
1 # UI Snippets
2 snippet uiad
3 ${1:alertDialog} = Ti.UI.createAlertDialog
4 id: '${2:$1}'
5 title: '$3'
6 message: '$4'
7 buttonNames: ['$5', '$6']
8 snippet uil
9 ${1:labelName} = Ti.UI.createLabel
10 id: '${2:$1}'
11 text: "${3}"
12 snippet uib
13 ${1:buttonName} = Ti.UI.createButton
14 id: '${2:$1}'
15 title: "${3}"
16 snippet uibb
17 ${1:buttonBarName} = Ti.UI.createButtonBar
18 id: '${2:$1}'
19 labels: ['$3', '$4', '$5']
20 snippet uicfv
21 ${1:coverFlowViewName} = Ti.UI.createCoverFlowView
22 id: '${2:$1}'
23 images: ['$3.png', '$4.png', '$5.png']
24 snippet uidbi
25 ${1:dashboardItemName} = Ti.UI.createDashboardItem
26 id: '${2:$1}'
27 snippet uidbv
28 ${1:dashboardViewName} = Ti.UI.createDashboardView
29 id: '${2:$1}'
30 snippet uied
31 ${1:emailDialogName} = Ti.UI.createEmailDialog
32 id: '${2:$1}'
33 $1.subject = "$3"
34 $1.subject = "$4"
35 $1.subject = "$5"
36 snippet uiiv
37 ${1:imageViewName} = Ti.UI.createImageView
38 id: '${2:$1}'
39 url: '$3'
40 snippet uiod
41 ${1:optionDialogName} = Ti.UI.createOptionDialog
42 id: '${2:$1}'
43 title: '$3'
44 options: ['$4', '$5']
45 cancel: 1
46 $1.show()
47 snippet uip
48 ${1:pickerName} = Ti.UI.createPicker
49 id: '${2:$1}'
50 snippet uipc
51 ${1:pickerColumnName} = Ti.UI.createPickerColumn
52 id: '${2:$1}'
53 snippet uipr
54 ${1:pickerRowName} = Ti.UI.createPickerRow
55 id: '${2:$1}'
56 snippet uipb
57 ${1:progressBarName} = Ti.UI.createProgressBar
58 id: '${2:$1}'
59 min: $3
60 max: $4
61 value: $5
62 message: $6
63 snippet uisv
64 ${1:scrollViewName} = Ti.UI.createScrollView
65 id: '${2:$1}'
66 contentWidth: '$3'
67 contentHeight: '$4'
68 top: 0
69 showVerticalScrollIndicator: true
70 showHorizontalIndicator: true
71 snippet uiscv
72 ${1:scrollableViewName} = Ti.UI.createScrollableView
73 id: '${2:$1}'
74 views: [$3, $4]
75 showPagingControl: true
76 snippet uisb
77 ${1:searchBarName} = Ti.UI.createSearchBar
78 id: '${2:$1}'
79 showCancel: ${3:true}
80 snippet uisw
81 ${1:switchName} = Ti.UI.createSwitch
82 id: '${2:$1}'
83 value: ${3:true}
84 snippet uitab
85 ${1:tabName} = Ti.UI.createTab
86 id: '${2:$1}'
87 window: ${3:window}
88 title: '$4'
89 snippet uitabg
90 ${1:tabGroupName} = Ti.UI.createTabGroup
91 id: '${2:$1}'
92 $1.show()
93 snippet uitabb
94 ${1:tabbedBarName} = Ti.UI.createTabbedBar
95 id: '${2:$1}'
96 labels: ['$3', '$4']
97 snippet uit
98 ${1:tableViewName} = Ti.UI.createTableView
99 id: '${2:$1}'
100 $1.headerTitle = "$3"
101 snippet uitr
102 ${1:tableViewRowName} = Ti.UI.createTableViewRow
103 id: '${2:$1}'
104 snippet uitvs
105 ${1:tableViewSectionName} = Ti.UI.createTableViewSection
106 id: '${2:$1}'
107 snippet uita
108 ${1:textAreaName} = Ti.UI.createTextArea
109 id: '${2:$1}'
110 value: "$3"
111 snippet uitf
112 ${1:textFieldName} = Ti.UI.createTextField
113 id: '${2:$1}'
114 value: "$3"
115 snippet uiv
116 ${1:viewName} = Ti.UI.createView
117 id: '${2:$1}'
118 snippet uiw
119 ${1:windowName} = Ti.UI.createWindow
120 id: '${2:$1}'
121 snippet uiwv
122 ${1:webViewName} = Ti.UI.createWebView
123 id: '${2:$1}'
124 url: '$3:http://www.google.com'
125 # Network Snippet
126 snippet uinet
127 ${1:httpClientName} = Ti.Network.createHTTPClient()
128 $1.onload = () ->
129 $1.open('$2', '$3')
130 $1.send()
131 # API
132 snippet tiai
133 Ti.API.info('${1}')
134 snippet tiad
135 Ti.API.debug('${1}')
136 snippet tiae
137 Ti.API.error('${1}')
138 # Properties
139 snippet tiap
140 Ti.App.Properties.${1}String('$2')
141 # EventListeners
142 snippet tievent
143 ${1}.addEventListener '${2}', (${3:e}) ->
Something went wrong with that request. Please try again.