Skip to content

Instantly share code, notes, and snippets.

View davidcyp's full-sized avatar

davidcyp davidcyp

View GitHub Profile
@davidcyp
davidcyp / background_demo.js
Created April 7, 2016 20:49 — forked from kosso/background_demo.js
Background Service notification for Titanium
/* Kosso : March 12th 2011
This the only way I managed to do this without the app crashing on resume.
Done slightly differently to the KS example, since they unregister the service and
do not use a setInterval timer.
*/
//############ in app.js :
// test for iOS 4+
@davidcyp
davidcyp / Readme.md
Created April 7, 2016 13:35 — forked from grantges/Readme.md
Shapes With Appcelerator Titanium and Hyperloop

Custom Alloy Tags based on Appcelerator Hyperloop modules

With Alloy and Hyperloop, you can quickly and easily expose native UI as Custom Alloy tags by leveraging the namespace (ns) attribute and commonjs modules.

Alloy allows you to create your own UI element that can be included into the XML View heirarchy in one of two ways, an Alloy Widget or through the use of Custom Tags.

To create your own custom tag, you link the tag to the commonjs module with the namespace attribute (ns). Here is an example using a custom tag to render a standard Titanium View: