All Projects → appcelerator → ti.es6

appcelerator / ti.es6

Licence: other
ES6 wrapper for the Titanium API

Programming Languages

javascript
184084 projects - #8 most used programming language

ti.es6

ES6 wrapper for the Titanium API

Usage

tiapp.xml
...
  <plugins>
    ...
    <plugin>ti.es6</plugin>
    ...
  </plugins>
...

Example

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:

import _Titanium from './Titanium';

const { UI } = _Titanium;
const { Window, Label, View, Animation, _2DMatrix } = UI;

Author

Gary Mathews

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].