ti-module-nl.fokkezb.colorpick
v1.0.2
Published
ColorPicker
Downloads
5
Readme
ColorPicker Module
Wraps Ryota Hayashi's ColorPicker for iOS for Appcelerator Titanium.
NOTE: For an Alloy cross-platform color picker widget see nl.fokkezb.color.
Example
See the site of the wrapped module:
Get it
Download the latest distribution and consult the Titanium Documentation on how install it, or simply use the gitTio CLI:
$ gittio install nl.fokkezb.colorpick
Use it
See the example or:
Alloy
index.xml
<Alloy>
<View module="nl.fokkezb.colorpick" color="#F00" onChange="onChange" />
</Alloy>
index.js
function onChange(e) {
console.debug('Color: ' e.color);
}
Classic
var colorpicker = require("nl.fokkezb.colorpick");
var view = colorpicker.createView({
color: "#F00"
});
view.addEventListener('change', function(e) {
console.debug('Color: ' + e.color);
});
Reference
Properties
Other then default Ti.UI.View
properties:
- (String) color: Sets or gets the picked color.
Events
Other then default Ti.UI.View
events:
- change: Fires when the users picks a different color. The hex value of the color can be found in the
color
property of the event object received by the listener.
Author
By Fokke Zandbergen with some help of Marcel Pociot.
License
The MIT License (MIT)
Copyright (c) 2014 Fokke Zandbergen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.