Titanium module to fetch Text Sizes as set by your Users as a perferrence. This is a great module if you care about your user's accessibility requirements.
- Run
build.py
which creates your distribution - cd to
/Library/Application Support/Titanium
- copy this zip file into the folder of your Titanium SDK
Register your module with your application by editing tiapp.xml
and adding your module.
Example:
Check the app in the example folder.
The module exposes one convinice method and one event
DZDynamicType.preferredSize() //use-case: when drawing the view for the first time
DZDynamicType.addEventListener("textSize", function(e) {
var newTextSize = e.size;
});
The event is fired each time the user changes the preferred font size, and returns to your app. No other configurations are required.
Please refer to the LICENSE file included in this repo.