Ti.Light
Titanium Flashlight example module
Install / Use
/learn @benbahrenburg/Ti.LightREADME
The Ti.Light project is a sample on how to create a flashlight module. This project was created for a TiConf US 2013 demonstration.
<h2>Before you start</h2> * 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. <h2>Download the compiled release</h2>Download the platform you wish to use:
- iOS Dist
- [Android Dist] (https://github.com/benbahrenburg/Ti.Light/tree/master/Android/dist)
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
- 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.
// 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(); </code></pre>
<h3>Twitter</h3>Please consider following the @benCoding Twitter for updates and more about Titanium.
<h3>Blog</h3>For module updates, Titanium tutorials and more please check out my blog at benCoding.Com.
