https://github.com/tidev/ti.es6
ES6 wrapper for the Titanium API
https://github.com/tidev/ti.es6
Last synced: about 1 month ago
JSON representation
ES6 wrapper for the Titanium API
- Host: GitHub
- URL: https://github.com/tidev/ti.es6
- Owner: tidev
- License: other
- Created: 2018-03-03T00:01:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-05T18:44:45.000Z (over 1 year ago)
- Last Synced: 2024-05-01T11:49:19.254Z (about 1 year ago)
- Language: JavaScript
- Size: 265 KB
- Stars: 11
- Watchers: 10
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![]()
ti.es6
ES6 wrapper for the Titanium API
### Usage
###### tiapp.xml
```XML
...
...
ti.es6
...
...
```#### Example
```JS
import { Window, Label, View, Animation, _2DMatrix } from './Titanium/UI';let win = new Window({
title: 'ES6',
layout: 'vertical',
backgroundColor: 'gray'
}),
lbl = new Label({
color: 'white',
font: {
fontSize: '32'
},
text: 'ES6!'
}),
view = new View({
backgroundColor: 'red',
width: 100,
height: 100
}),
matrix = new _2DMatrix({
rotate: 90
}),
animation = new Animation({
transform: matrix,
duration: 3000
});win.addEventListener('postlayout', async () => {
await view.animate(animation);
view.backgroundColor = 'orange';
alert('DONE ANIMATION!');
});win.add([lbl, view]);
win.open();
```
##### NOTE
You can also specify sub-modules like so:
```JS
import _Titanium from './Titanium';const { UI } = _Titanium;
const { Window, Label, View, Animation, _2DMatrix } = UI;
```#### Author
Gary Mathews