Skip to content
This repository was archived by the owner on Nov 24, 2019. It is now read-only.
benbahrenburgPublic archive

About

Titanium Flashlight example module

Resources

Stars

13 stars

Watchers

1 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ti.Light

The Ti.Light project is a sample on how to create a flashlight module. This project was created for a TiConf US 2013 demonstration.

Before you start

* These are iOS and Android native modules designed to work with Titanium SDK 3.1.0.GA * Before using this module you first need to install the package. If you need instructions on how to install a 3rd party module please read this installation guide.

Download the compiled release

Download the platform you wish to use:

Building from source?

If you are building from source you will need to do the following:

Import the project into Xcode:

  • Modify the titanium.xcconfig file with the path to your Titanium installation

Import the project into Eclipse:

  • Update the .classpath
  • Update the build properties

Setup

  • Download the latest release from the releases folder ( or you can build it yourself )
  • Install the ti.light module. If you need help here is a "How To" guide.
  • You can now use the module via the commonJS require method, example shown below.

Example


var torch = require('ti.light');
Ti.API.info("module is => " + torch);

// open a single window var win = Ti.UI.createWindow({ backgroundColor:'#fff' });

var button = Ti.UI.createButton({ title:'Click to toggle', height:'80dp', width:Ti.UI.FILL, top:40 }); win.add(button);

button.addEventListener('click',function(d){ torch.toggle(); })

win.open();

Twitter

Please consider following the @benCoding Twitter for updates and more about Titanium.

Blog

For module updates, Titanium tutorials and more please check out my blog at benCoding.Com.

About

Titanium Flashlight example module

Resources

Stars

13 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages