Skip to content

A titanium alloy widget that consists in a label that highlights the occurrences searched inside its text. It uses the new AttributedString API for iOS introduced in Titanium 3.2

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.txt
Notifications You must be signed in to change notification settings

jaraen/TiHighlightLabel

Repository files navigation

TiHighlightLabel Widget and demo project

This Titanium + Alloy project demonstrates the use of AttributedString component introduced in Titanium 3.2 for iOS7.

TiHighlightLabel is a normal label that allows to highlight dynamically part of its text.

Screenshot

It implements a search method to easily highlight all the occurrences in its text.

All its behaviour is like a normal label. Look into index.tss to see an example on how to style the label and the highlighted parts and index.xml to see how to use it in a view.

Note that for initializing the label you can set the text property in your tss file. But for initializing or setting the text from the controller, you need to access to the widget's view, which means call to $.yourlabel.getView().text = 'new value';

License

Code and project under MIT License

Original code, documentation and example by Javier Rayon - 2014 twitter: @jrayon http://www.criteriastudio.com javier at criteriastudio ' com

About

A titanium alloy widget that consists in a label that highlights the occurrences searched inside its text. It uses the new AttributedString API for iOS introduced in Titanium 3.2

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published